SITTWE, Myanmar — People fled their burning homes and Myanmar's security forces struggled to contain communal violence Tuesday in a western region where state media reported the death toll climbed to 21.

The conflict pitting ethnic Rakhine Buddhists against stateless Rohingya Muslims in coastal Rakhine state marks some of the worst sectarian unrest recorded in Myanmar in years. President Thein Sein has declared an emergency in Rakhine state and warned that the spiraling violence could threaten the democratic reforms tentatively transforming the country after half a century of military rule.

From Friday through Monday, the evening's news report said, 21 people have been killed, 21 wounded and 1,662 houses burned down around Rakhine state. The mass violence started Friday in Maungdaw township, when what was said to be a mob of 1,000 Muslims – described as "terrorists" in the state media – went on a rampage and had to be restrained by armed troops.

The violence afterward spread, including to the state capital, Sittwe.

The television report said the authorities have tried to restore stability but clashes continued and arson had been committed in Sittwe and Maungdaw on Monday.

It added that security forces had to intervene as communal tensions erupted Monday and Tuesday in several parts of Sittwe. An AP journalist saw the corpses of four people killed in the city, though it is not clear they were accounted for in the death toll reported by television.

On Tuesday in Sittwe, police fired live rounds into the air to disperse Rohingyas who could be seen burning homes in one neighborhood. Hordes of people ran to escape the chaos.

"Smoke is billowing from many directions, and we are scared," said Ma Thein, an ethnic Rakhine resident in Sittwe, where dark smoke from numerous fires covered the skyline into the late afternoon. "The government should send in more security forces to protect both communities."

Truckloads of security forces have been deployed in Sittwe, and much of the port city was reported calm, including its main road. But homes were burning in three or four districts that have yet to be pacified.

In one, police fired skyward to separate hundreds-strong mobs wielding sticks and stones; in another, soldiers helped move 1,000 Muslims by trucks to safer areas.

State TV showed Defense Minister Gen. Hla Min visiting refugee camps for Rakhines opened at Buddhist monasteries and distributing food and other relief goods.

It also showed him meeting with some Muslim elders in Sittwe and visiting camps where Muslim villagers are sheltered, to which he also gave relief goods. It was the first time state television showed a camp housing Muslims.

Ma Thein said that some people were running short of food and water, with banks, schools and markets closed. Some small shops opened early Tuesday to sell fish and vegetables early in the morning to residents who braved the tense streets.

Neighboring Bangladesh has turned back about 1,500 Rohingyas trying to escape by boat in recent days, according to officials there. "We are keeping our eyes open so that nobody can enter Bangladesh illegally," police official Jahangir Alam said.

The unrest in Myanmar was triggered by the rape and murder last month of a Buddhist girl, allegedly by three Muslims, and the June 3 lynching of 10 Muslims in apparent retaliation.

Myanmar's government regards the Rohingyas as illegal migrants from Bangladesh and has rendered them stateless by denying them citizenship. Although some are recent settlers, many have lived in Myanmar for generations and rights groups say they suffer severe discrimination.

The United Nations' refugee agency estimates 800,000 Rohingya live in Myanmar's mountainous Rakhine state. Thousands attempt to flee every year to Bangladesh, Malaysia and elsewhere.

The conflict poses one the biggest tests yet for Myanmar's new government and how it handles the unrest will draw close scrutiny from Western powers, which have praised Thein Sein's administration and rewarded it by easing years of harsh economic sanctions.

Human Rights Watch called on the government to "take all necessary steps" to protect at-risk communities and questioned the decision to call a state of emergency, which allows the military to take over administrative functions in the area.

"Given the Burmese army's brutal record of abuses ... putting the military in charge of law enforcement could make matters worse," said Elaine Pearson, the New York-based group's deputy Asia director. Myanmar's former name of Burma is preferred by many activists.

On Monday, U.S. Secretary of State Hillary Rodham Clinton urged a halt to the violence and a transparent investigation.

State-run newspapers reported that 4,100 people who lost homes had taken refuge in Buddhist monasteries, schools and in a police headquarters the towns of Maungdaw and nearby Buthidaung.

Thousands more were reportedly displaced in Sittwe itself, according to a Rakhine political party. The Rakhine Nationalities Development Party is one of the major parties associated with the country's ethnic minorities, and holds several dozen seats in the 664-member parliament.

Loading Slideshow...
  • Muslims villagers are relocated to secure areas in Sittwe, the capital of Rakhine state in western Myanmar, where sectarian violence is ongoing Tuesday, June 12, 2012. (AP Photo/Khin Maung Win)

  • Myanmar policemen walk towards burning buildings in Sittwe, capital of Rakhine state in western Myanmar, where sectarian violence IS ongoing Tuesday, June 12, 2012. (AP Photo/Khin Maung Win)

  • Soldiers keep watch as fleeing Muslims from villages are relocated to secure areas in Sittwe, the capital of the Rakhine state in western Myanmar, where sectarian violence is ongoing Tuesday, June 12, 2012. (AP Photo/Khin Maung Win)

  • Myanmar policemen walk towards burning buildings in Sittwe, the capital of Rakhine state in western Myanmar, where sectarian violence is ongoing Tuesday, June 12, 2012. (AP Photo/Khin Maung Win)

  • Myanmar policemen walk toward burning buildings in Sittwe, the capital of Rakhine state in western Myanmar, where sectarian violence is ongoing Tuesday, June 12, 2012. (AP Photo/Khin Maung Win)

  • Smokes and flames billow from burning buildings in Sittwe, the capital of Rakhine state in western Myanmar, where sectarian violence is ongoing Tuesday, June 12, 2012. (AP Photo/Khin Maung Win)

  • Ethnic Rakhine Buddhist monks gather at Sule Pagoda in downtown Yangon, Myanmar, Tuesday, June 12, 2012. (AP Photo/Aye Aye Win)

  • A Rohingya protester cries as he holds a placard during a rally to call for an end to the ongoing unrest and violence in Myanmar's Rakhine state, in Kuala Lumpur, Malaysia, Tuesday, June 12, 2012. (AP Photo/ Vincent Thian)

  • Rohingya protesters hold placards during a rally to call for an end to the ongoing unrest and violence in Myanmar's Rakhine State, in Kuala Lumpur, Malaysia, Tuesday, June 12, 2012. (AP Photo/Lai Seng Sin)

  • A person throws a bucket of water at a house engulfed in flames in Sittwe, Myanmar, Monday, June 11, 2012. (AP Photo/Kihn Maung Win)

  • Smokes and flames are billowing from burning buildings at a village in Sittwe, capital of Rakhine state in western Myanmar, where sectarian violence are ongoing Monday, June. 11, 2012. (AP Photo/Khin Maung Win)

  • Local residences taking refuge at a monastery in Sittwe, capital of Rakhine state in western Myanmar, where sectarian violence is impacting on the local population Monday Junee 11, 2012. (AP Photo/Khin Maung Win)

  • Local residences take refuge at a monastery in Sittwe, capital of Rakhine state in western Myanmar, where sectarian violence is impacting on the local population Monday June 11, 2012. (AP Photo/Khin Maung Win)

  • Local residences push a trishaw vehicle carrying their belongings at a village in Sittwe, capital of Rakhine state in western Myanmar, where sectarian violence is impacting on the local population Monday June 11, 2012. (AP Photo/Khin Maung Win)

  • Smokes and flames billow from the burnt buildings at a village in Sittwe, capital of Rakhine state in western Myanmar, where sectarian violence are ongoing Monday, June 11, 2012. (AP Photo/Khin Maung Win)

  • Children take refugee at a monastery in Sittwe, capital of Rakhine state in western Myanmar, where sectarian violence goes on Monday, June 11, 2012. (AP Photo/Khin Maung Win)

  • People look on a house engulfed in flames in Sittwe, Myanmar, Monday, June 11, 2012. With fearful residents cowering indoors, security forces patrolling a tense town in western Myanmar collected bodies Monday from the debris of homes burned down over the weekend in some of the country's deadliest sectarian bloodshed in years. (AP Photo/Kihn Maung Win)

  • A Buddhist monk stands in the debris of burned houses still smoldering in Sittwe, Myanmar, Monday, June 11, 2012. (AP Photo/Kihn Maung Win)

  • Rohingya protesters gather in front of a United Nations regional office building to call for an end to the ongoing unrest and violence in Myanmar's Rakhine State, in Bangkok on June 11, 2012. (NICOLAS ASFOURI/AFP/GettyImages)