Updated

Burma's president declared a state of emergency Friday in a central city shaken by sectarian bloodshed that has killed at least 20 people, as thousands of minority Muslims fled and overwhelmed riot police crisscrossed the still-burning town seizing machetes and hammers from enraged Buddhist mobs.

Black smoke and flames poured from destroyed buildings in Meikhtila, where the unrest between local Buddhist and Muslim residents erupted Wednesday -- the latest challenge to Burma's ever-precarious transition to democratic rule.

Little appeared to be left of some palm tree-lined neighborhoods, where whole plots were reduced to smoldering masses of twisted debris and ash. Broken glass, destroyed motorcycles and overturned tables littered roads beside rows of burnt-out homes and shops, evidence of the widespread chaos of the last two days.

The devastation was reminiscent of strikingly similar scenes last year in western Burma, where sectarian violence between ethnic Rakhine Buddhists and Muslim Rohingya left hundreds of people dead. More than 100,000 people are still displaced from that conflict, almost all of them Muslim.

Human rights groups had warned that unrest in the west could spread to other parts of the country, and last year, prominent Buddhist monks rallied against Muslims in the central Burma town of Mandalay. The clashes in Meikhtila are the first reported outside of western Burma since then.

It was not immediately clear which side bore the brunt of the latest violence, but terrified Muslims, who make about 30 percent of Meikhtila's 100,000 inhabitants, stayed off the streets Friday as their shops and homes continued to burn and angry Buddhist residents and monks prevented authorities from putting out the blazes.

Trucks of police stood guard outside the blackened, empty hulk of one aqua-colored mosque, one of at least five torched this week by Buddhist gangs.

Win Htein, a local lawmaker from the opposition National League for Democracy, said he had counted at least 20 bodies. He said 1,200 Muslim families -- at least 6,000 people -- have fled their homes and taken refuge at a stadium and a police station.

An unknown number of Buddhists, meanwhile, sought refuge inside the city's shrines.

"The situation is unpredictable and dangerous," said Sein Shwe, a shop owner. "We don't feel safe and we have now moved inside a monastery."

The government's struggle to contain the violence is proving another major challenge for President Thein Sein's reformist administration as it attempts to chart a path to democracy after nearly half a century of military rule that once crushed all dissent.

Thein Sein took office two years ago this month, and despite ushering in an era of reform, he has faced not only violence in Rakhine state, but an upsurge in fighting with ethnic Kachin rebels in the north and major protests at a northern copper mine where angry residents -- emboldened by promises of freedom of expression -- have come out to denounce land grabbing.

The troubles in Meikhtila began Wednesday after an argument broke out between a Muslim gold shop owner and his Buddhist customers. A Buddhist monk was among the first killed, inflaming tensions that led a Buddhist mob to rampage through a Muslim neighborhood.

By Friday, clashes had ceased, but the city remained tense and police could be seen seizing knives, swords, hammers and sticks from young men in the streets and detaining scores of looters.

Monks accosted and threatened journalists trying to cover the unrest, at one point trying to drag a group of several out of a van. One monk, whose faced was covered, shoved a foot-long dagger at the neck of an Associated Press photographer and demanded his camera. The photographer defused the situation by handing over his camera's memory card.

The group of nine journalists took refuge in a monastery and stayed there until a police unit was able to escort them to safety.

There were indications, too, that the violence spread Friday to at least one village on the outskirts of Meikhtila, about 340 miles north of the main city of Yangon.

Local activist Myint Myint Aye said fires were burning in the nearby village of Chan Aye, where shops were looted but calm was restored later in the day.

In an acknowledgement of the seriousness of the situation, Thein Sein declared a state of emergency in Meikhtila in an announcement broadcast on state television. The declaration allows the military to take over administrative functions in and around the town.

He also declared a state of emergency in three nearby townships, but there were no reports of violence there.

The U.N. secretary-general's special adviser to Burma, Vijay Nambiar, issued a statement expressing "deep sorrow at the tragic loss of lives and destruction."
  He said religious and community leaders must "publicly call on their followers to abjure violence, respect the law and promote peace."

The U.S. ambassador to Burma, Derek Mitchell, also said he was "deeply concerned about reports of violence and widespread property damage in Meikhtila."

Occasional isolated violence involving Burma's majority Buddhist and minority Muslim communities has occurred for decades.

Under the military governments that ruled Burma from 1962 until 2011, ethnic and religious unrest was typically hushed up, an approach made easier in pre-Internet days, when there was a state monopoly on daily newspapers, radio and television, backed by tough censorship of other media.

But since an elected, though still military-backed, government took power in 2011, people have been using the Internet and social media in increasing numbers, and the press has been unshackled, with censorship mostly dropped and privately owned daily newspapers expected to hit the streets in the next few months.

The government of Thein Sein is constrained from using open force to quell unrest because it needs foreign approval in order to woo aid and investment. The previous military junta had no such compunctions about using force, and was ostracized by the international community for its human rights abuses.

There was no apparent direct connection between the Meikhtila violence and that last year in Rakhine state. Rakhine Buddhists allege that Rohingya are mostly illegal immigrants from neighboring Bangladesh. The Muslim population of Meikhtila is believed to be mostly of Indian origin, and although religious tensions are longstanding, the incident sparking the violence seemed to be a small and isolated dispute.