Sectarian violence could put Burma's transition to democracy at risk, President Thein Sein has warned, as the government declared a state of emergency in the country's west after clashes between Buddhists and Muslims left at least eight people dead and 17 wounded.

Earlier on Sunday, authorities imposed a curfew on four towns in Arakan state, where tensions have been steadily growing since the killing of 10 Muslims on a bus in early June.

In a televised addressed, Thein Sein said the violence had been fanned by hatred and the desire for revenge. "If we put racial and religious issues at the forefront, if we put the never-ending hatred, desire for revenge and anarchic actions at the forefront, and if we continue to retaliate and terrorise and kill each other, there's a danger that [the troubles] could multiply and move beyond Arakan," he said.

"If this happens, the general public should be aware that the country's stability and peace, democratisation process and development … could be severely affected and much would be lost."

It is the first time since he took office last year that the president has imposed a state of emergency, which allows the army to take administrative control. The order will remain until further notice, he said.

A 12-year-old girl identified as Razen Bibi became the eighth person to die in the unrest after reportedly being shot on Sunday by riot police outside her home in the town of Maungdaw. Foreigners are barred from entering Maungdaw, but local staff working undercover for the Arakan Project, an international NGO monitoring Burma's westernmost state, said they saw the body being taken away by police.

Opposition leader Aung San Suu Kyi, due to visit Europe this week, appealed for calm amid the rioting. It was not yet clear if the state of emergency would affect her travel plans, but the violence could take the shine off her tour, billed as a sign of progress in her country.

The unrest appears to have its roots in an incident on 3 June in which a group of Muslim pilgrims were beaten to death by Buddhists from Arakan, allegedly in response to the gang rape and murder of a 26-year-old woman by three Muslim men in late May.

Racial and religious tension is not new in Arakan, which sits on the border with Bangladesh and has Burma's highest concentration of Muslims. But the current violence is the worst in a decade and state media warned of anarchy unless calm prevails.

Maung Zarni, a visiting fellow at the London School of Economics, said the situation was all the more tragic considering both sides of the conflict have experienced persecution by the Burmese authorities. He added that the nominally civilian government could benefit from the unrest. He said it diverted attention from the military's continued attacks on other ethnic groups.

Christian Solidarity Worldwide (CSW), a religious freedom campaign group, deplored the "rising racism [and] intolerance" in Burma, which it said "follows a steady increase in racist propaganda against Muslims generally". Several Facebook groups have been set up since the 3 June lynching, including one called Kalar beheading gang. Kalar is a pejorative slur popularly employed by Burmese to refer to Muslims of south Asian descent.

The CSW statement said the Rohingya, a Muslim minority group denied citizenship by the government, was subject to particularly inhumane treatment. Up to 300,000 Rohingya have fled to Bangladesh to escape state-sanctioned abuse and discrimination by Arakanese locals.

Chris Lewa of the Arakan Project told the Guardian that contrary to some media reports claiming calm has been restored, the situation was getting worse, particularly in Maungdaw, where hundreds more soldiers have been deployed. Several parts of Sittwe, the state capital, have been set ablaze and Lewa said that with an equal ratio of Muslims to Buddhists in Sittwe, turmoil there could dramatically escalate.

Various overseas Rohingya groups have blamed Arakanese locals for the deaths at the weekend, although Lewa said it was largely troops who had attacked Muslims. That was echoed by Tun Khin, head of the Burma Rohingya Organisation UK, who said Friday's unrest was triggered by troops firing at a crowd leaving a prayer ceremony and killing two.

Animosity has been stoked even by prominent members of Burma's pro-democracy movement. Ko Ko Gyi, a former political prisoner and leader of the 1988 student uprising, this week referred to the Rohingya as terrorists, adding: "We want to say clearly that Rohingya are not one of the Myanmar [Burma] ethnic nationalities."

Benedict Rogers of CSW said: "The exact history of the Rohingya can be discussed and debated among scholars in a civilised way, but no one can dispute that they have lived in Burma for generations and as such should be recognised as citizens of the country."

The rioting could potentially destabilise Burma's fragile reform process. The military-drafted, vaguely worded constitution allows for the army chief to retake power in a national emergency.