Thousands of drunken white youths attacked people they believed were of Arab descent at a beach outside Sydney on Sunday in one of Australia's worst outbursts of ethnic violence. The attack, apparently prompted by reports that Lebanese youths had assaulted two lifeguards, led to retaliation by young men of Arab descent in several Sydney suburbs on Monday. The young people fought with the police and smashed 40 cars with sticks and bats, the police said. The police had increased the number of officers patrolling the beach in the Sydney suburb of Cronulla on Sunday after cellphone text messages urged people to gather there to retaliate for the attack on the lifeguards. The police said more than 5,000 white youths, some wrapped in Australian flags and chanting racist slurs, had fought with the police, attacked people they believed to be of Arab descent and assaulted a pair of paramedics trying to help people escape the riot. The police fought back with riot sticks and pepper spray. Many of the youths had been drinking heavily, the police said. One white teenager had the words, "We grew here, you flew here," painted on his back. Television broadcasts showed a group of young women attacking another woman. The rampage on Monday also occurred in Cronulla and in neighboring Carringbah, said Paul Bugden, a spokesman for the New South Wales police. Calm was restored by early Tuesday. On Sunday, 31 people were injured and 16 arrested. On Monday, Mr. Bugden said, there were six arrests and one injury. Morris Iemma, the premier of the state of New South Wales, said the police would use video images and photographs to track down the instigators of the violence. Prime Minister John Howard condemned the violence, but said he did not believe racism was widespread in Australia. "Attacking people on the basis of their race, their appearance, their ethnicity, is totally unacceptable and should be repudiated by all Australians irrespective of their own background and their politics," he said. Tensions between youths of Arabic descent and white Australians have been rising in recent years, largely because of anti-Muslim sentiment fueled by the Sept. 11, 2001, terror attacks in the United States and bombings on the Indonesian island of Bali that killed 202 people, including 88 Australians, in October 2002. About 300,000 Muslims live in Australia, a majority in large cities.