Thousands of people lined the streets surrounding Lakemba Mosque in Sydney's west on Friday morning as they took part in morning prayers ahead of Eid al-Fitr celebrations.
Anthony Albanese was invited to meet with community leaders, but his arrival quickly drew condemnation from locals.
One man was dragged out by police after booing Mr Albanese, but was released without charge after being given a move-on direction.
Others were heard yelling phrases including "disgrace", "shame" and "genocide supporters", though the prime minister remained calm and sat listening as Lebanese Muslim Association secretary Gamel Kheir read out a statement panning Australia's involvement in the Middle East war and the impacts it has had on the Muslim community.
Mr Albanese then left via a side exit, side-stepping a large crowd waiting for him on the Mosque's steps.
For Mr Kheir, it was important the prime ministerial visit not be used as a mere photo opportunity.
"This is a time to call him out and to say to him vividly what is happening to this community, and the pressure that it's under cannot be sustained anymore," he told AAP.
Showgrounds and mosques across Australia will be packed for the weekend as Muslims celebrate the end of the holy month of Ramadan.
Friday marks Eid al-Fitr, the end of the month-long observance of the Islamic event marked by prayers and daily fasting.
While Ramadan is noted for its importance in spiritual reflection, Eid represents a chance for the community to celebrate with food, music and family reunions.
The Eid Show, at Bankstown Showground in southwest Sydney, is expecting thousands of attendees this weekend and has grown massively in its 17-year history.
The event is expected to be even more significant this year with the spectre of conflict in the Middle East looming over much of the Australian Muslim community.
"It means happiness, celebration. It also means hope and looking forward to something in grim times," organiser Radwan Dadoun told AAP.
There are estimated to be about one million Muslims living in Australia, according to Mehmet Ozalp, head of the Centre of Islamic Studies at Charles Sturt University.
While many of them will choose to spend much of the weekend at celebrations like The Eid Show, mosques are also expecting a cast of thousands to mark the important religious occasion.
"We do have a big gathering (on Friday), we're going to have a congregation of four sessions," secretary of the Melbourne Grand Mosque Imran Khan Mohammed told AAP.
"We're going to have 15 to 18,000 coming from all over Melbourne."
For the mosque, Eid al-Fitr is the biggest day of the year for attendance.
Sharing food and love among families and those less fortunate forms a vital aspect of the celebration.
The homeless, single parents and others feeling financial stress benefit from the sharing of incomes and food at Eid, Mr Mohammed said.
Both mosques and shows are open to non-Muslims who want to celebrate with their friends and neighbours, with Mr Dadoun having just one piece of advice for the uninitiated.
"Come hungry and come with the beautiful smiles that you have," he said.