In almost any circumstance, pushing a police officer and kicking a police dog aren’t considered smart things to do. But does that behavior — even if it took place during the chaos and fury of a riot — deserve four years and one month in prison? Yes, say the Australian courts in what appears to be a draconian ruling for a country with a relatively progressive legal system.

Bear in mind it was no ordinary riot. Part of the worldwide protests that followed the publishing last September on YouTube of anti-Islam film Innocence of Muslims, the Sept. 15 riot turned Sydney’s central business district into a war zone where Muslim protesters attacked police, destroyed public property and carried placards reading “Behead all those who insult the Prophet.” And it took place in Hyde Park, a lush green space consecrated to monuments honoring Australia’s war dead, including Sydney’s largest ANZAC War Memorial, the Pool of Remembrance. The wheels of justice finally turned on May 9 when a 26-year-old Australian man, plumber Mahmoud Eid, became the first of 12 defendants to be jailed over the affray. On handing Eid the maximum sentence for kicking a police dog and pushing a female police officer, New South Wales deputy chief magistrate Jane Culver said she would have locked him up for longer if the law allowed it.

The trial and sentencing throw into sharp relief the gulf that exists between the mainstream Australian public and an at times vocal class of disaffected, ethnically Arab youth. The sprawling, low- and middle-income suburbs of Western Sydney may be a long way from the Parisian banlieues and the grimy streets of East London, but each is home to disaffected migrants and locally born second generations, who consider themselves socially excluded from, and culturally at odds with, their new countries.

Granted, they are in the minority. Sitting in Al Andalas Cafe, a popular North African haunt in the southwestern suburb of Lakemba, an Algerian-born migrant in his 40s who identified himself as Jugurtha sums up the predominant sentiment of a largely law-abiding local community when he says, “In France, Muslim people feel marginalized. Here, my main concerns are soccer training and the education of my kids.” In a nearby restaurant, 26-year-old waiter Bashir Ghazal condemns the violence. “I don’t support people going crazy like that,” he says.

But Eid’s lawyer Elie Rahme, an Australian-born Lebanese Christian, tells TIME his client’s actions and those of other protesters in the Sept. 15 riot are symptoms of the disenfranchisement and alienation becoming common among many Muslims in Australia. “We think because we are not shooting or hanging Muslims, we are not persecuting them,” he says. “But you can persecute people psychologically through prejudice and labeling that makes them feel out of place. All the TV stations around the country reported the riot as a ‘Muslim riot’ when it was only a small number of the 300 peaceful protesters there on the day that committed acts of violence. If I were Muslim, I would have felt persecuted listening to that.”

Repeated allegations of racial profiling by the New South Wales police force have added fuel to the fire. Last year, a Sydney criminal lawyer of Middle Eastern ancestry, Adam Houda received an undisclosed out-of-court settlement after he sued police for a 2010 incident where he was roughed up and arrested over a robbery while walking home from evening prayers. It was the sixth time Houda had been wrongfully arrested and the third time he’d sued the police. “It’s something that occurs on a daily basis,” he says. “When it happens to me, I am fortunate enough to have the resources and manpower to do something about it. I get complaints about it at my office every single day. It’s not something new. It’s part of a culture.”

Known as the go-to lawyer for Muslims charged under Australia’s controversial counterterrorism laws, including former Guantánamo Bay inmate turned serial litigator Mamdouh Habib, Houda visited Eid in detention this weekend to set in motion an appeal. “When you consider he handed himself in, pleaded guilty and showed remorse, the sentence was a stunning result,” Houda says of his new client, who was previously been jailed for a similar offense relating to the infamous 2005 Cronulla riots that saw racial clashes spread across different parts of Sydney. “We’ll be launching an appeal and I am expecting a huge reduction in the penalty,” he says. “It’s very hard for [non-Muslim] Australians to understand the emotion involved when someone insults the prophet’s name,” he adds, referring to the film that ignited the September riots.

Houda’s sentiments were echoed by Rebecca Kay, a Muslim convert who has run for state and local seats in the Sydney suburb of Bankstown and who witnessed the riots from close quarters. “Muslims feel ostracized here and some of them get seduced into a hardcore version of Islam,” she says. “You wouldn’t believe how much hatred we receive through social media and Facebook pages like Ban the Burqa. And talkback radio in Australia is the worst. The say really horrible things about us.” Although Kay understands the intensity of the passions involved, she, like most Australian Muslims, does not support last September’s violence. “With better leadership and better organization of the protests, the violence could’ve been prevented,” she says.

Condemnation of the rioters’ actions has even come from the unlikely person of Sheik Feiz Mohammed. A firebrand cleric watched closely by police, the sheik made global headlines last month when it was revealed that Tamerlan Tsarnaev, the deceased Boston-bombing suspect, had uploaded a video sermon of the sheik vilifying the Harry Potter series for promoting witchcraft among children. In another video, thought to be recorded in 2004, the sheik described Jews as “pigs” and grunted for effect. And at a 2005 town-hall meeting in Sydney, he said women who dress in “satanic skirts” have no one to blame but themselves if they are raped.

But following a lengthy self-imposed exile in the Middle East, the sheik has returned to Australia and apparently reinvented himself as a voice of reason. In a video interview with the nonprofit group Muslim Village, he described the Sept. 15 riot as unacceptable and contrary to the teachings of Islam. “Islam teaches us not to despair,” he said, “not to behave in a desperate way, not to take matters into our own hands and definitely not to behave in a foolish and repugnant manner.” As one of millions of Sydneysiders who raged with indignation after seeing footage of overzealous protesters trying to storm the U.S. consulate and a bloodied, unconscious policeman being dragged to safety by his colleagues, I find myself, a practicing Jew, oddly in agreement with the sheik. Once we’ve agreed on responsible behavior, everything else can follow: dialogue, tolerance and helping disaffected young Muslims find their rightful place in Australia’s many-hued cultural fabric.