CANBERRA - The violence that erupted at Sydney beaches was the bomb at the end of a long, slow-burning social fuse.
The entrenched tribalism of the city's coastal suburbs, the trigger for similar brawls between surfies and rockers in the 1960s, and regular confrontations between locals and "westies" from Sydney's inland fringes, was overlaid by the inevitable pressures of a new, diverse, Australia.
To this was added the tensions and fears that have followed the terror attacks of September 11, 2001, and the Bali bombings, heightened by revelations of homegrown terrorist cells and Australia's growing sense of vulnerability.
It was exploited by troublemakers on both sides, fuelled by alcohol and thugs who regard brawling as entertainment, evidenced by internet notices urging a mass roll-up for the weekend's riots and the flood of hooligans to Cronulla and other southern beaches from other parts of the city.
Once calm is restored Sydney will sit down to an intensive dissection of the causes. The rest of the nation will watch with deep interest: Similar tinderboxes exist throughout a nation in which 6 million migrants have settled since the Second World War.
Last week, Adelaide police arrested six youths after gangs of white Australians and others of Middle Eastern origin took to each other with baseball bats and machetes outside a suburban high school.
The tensions exist on both sides, at almost every level. In Sydney, a white Australian teenager was forced to change schools after bullying, bashing and taunts of "whitey" by his mainly Middle Eastern classmates. In western Sydney pubs, local whites liquor up on Friday night before going out for a bit of "Leb (Lebanese) bashing".
On the street, young ethnic males complain they are unfairly targeted by police, and subjected to racial abuse when they are stopped. At a policy level Muslims, especially, complain that new anti-terror laws will inevitably target - and isolate - their communities.
All these elements have come together to pump the anger of young Lebanese in Sydney, most of whom live in the western areas of Canterbury, Bankstown and Parramatta.
Most move in easily identifiable groups, including the gangs that have smeared the standing of their communities.
A study by Sydney's University of Technology reported that after Aborigines and Muslims, Lebanese were the third-largest racial group complaining of vilification to the New South Wales Anti-Discrimination Board.
Antagonism has grown since the rise of Islamic terrorism, with young Lebanese men returning violence for violence, exacting often random revenge for insults, bashings and the ripping of traditional Muslim clothing from women.
The worst among them have gone far beyond this, committing crimes that have hardened intolerance, ranging from drug turf wars to an attack on the Lakemba police station using semi-automatic rifles. One of the men involved in that shooting later turned to radical Islam and is now in a Lebanese jail.
Worse still was the series of four gang rapes by Lebanese youths that horrified Sydney several years ago. One of the ringleaders sent text messages urging mates to "bash a Christian or Catholic" when they felt down. Others racially abused their white victims, calling one an "Aussie pig".
Over the past few years, Cronulla locals have told reporters gangs of young Lebanese men have taken their aggression to the beaches of Sutherland Shire, on Sydney's southeastern fringe.
Talkback radio, TV news programmes and newspapers have been packed with complaints of "Lebs" posturing in the sand, abusing and at times attacking locals and beachgoers, and frightening people away.
Lebanese community spokesmen retort that their people - most of who are naturalised Australians or, increasingly, Australian-born - have every right to be at the beach but have regularly themselves been the victims of abuse and threats.
Inevitably, it all flew to pieces last week when a Lebanese gang beat up young lifesavers.
"I think any gang, regardless of its ethnic background, is about a sense of belonging, because they don't feel they belong anywhere, so they need to claim some sort of power in their eyes," Father Geoffrey Abdallah, the director of the Maronite Lebanese Youth Organisation, told ABC radio.
A matter of race
* Australia, one of the world's most ethnically diverse nations, has levels of underlying racism.
* Repeated surveys have shown discrimination against non-European migrants in housing, work and sport, where young ethnic players complain of being passed over in favour of equally matched whites. The Human Rights and Equal Opportunity Commission noted that racially discriminatory practices were "widespread, institutional in nature and practised at all levels of society".
* Researchers say the causes include colonial cultural hangovers that tend to regard Australians of non-British origins as "others" to be suspected or feared, and a growing sense of fear and isolation sparked by a globalised economy and large migrant flows.