A mosque in the Sri Lankan capital has been closed after an attack by a Buddhist mob over the weekend sparked clashes in which five people were hurt.
Muslims in Colombo's Grandpass area will now use an older place of worship which has been saved from demolition in a deal struck with the government.
But the authorities have also been condemned for failing to make arrests.
In recent months hard-line Buddhist groups have mounted a campaign against Muslim and Christian targets.
Last month, a group of Buddhist monks protested near the mosque, demanding it be relocated.
But during evening prayers on Saturday night Buddhist-led crowds threw stones at the mosque. Police imposed a curfew when Buddhists and Muslims clashed after the attack on Sunday.
The curfew has now been lifted but hundreds of police and special forces are still present on the streets of Grandpass, BBC Sinhala's Azzam Ameen reports.
The Sri Lanka Muslim Council confirmed that the mosque which was attacked would be abandoned for an older place of worship which the government had previously earmarked for demolition.
"We have a compromise deal worked out last night," Council President NM Ameen told the Agence France-Presse news agency. "From today, we are out of the new mosque," he said.
After a meeting with religious leaders the government withdrew plans to develop a canal behind the old mosque, allowing Muslims use of that site once more.
"Through a just solution, we have now peacefully solved the issue," minister Champika Ranawaka told reporters.
But the violence has sparked criticism, with Sri Lanka's main opposition UNP party condemning authorities for failing to make arrests.
"Not a single arrest [has been] made so far, when it comes to attacks against religious places over the past year. This why we are seeing more and more attacks," MP Harin Fernando told the BBC.
A US embassy statement said that the incident was "particularly troubling in light of a large number of recent attacks against the Muslim community".
The past year has seen mounting religious tension in the country as hard-line Buddhist groups have attacked mosques and Muslim-owned businesses, as well as churches and clergy.
In February, one group also called for the abolition of the Muslim halal system of certifying foods and other goods.
Buddhist hard-liners accuse Muslims and Christians of promoting extremism and trying to convert Buddhists to their own faiths. Both Muslims and Christians have denied such accusations.
The Buddhist Sinhalese community makes up three-quarters of Sri Lanka's population of 20 million.
During Sri Lanka's bitter civil war, the Muslims - a small Tamil-speaking minority, about 9% of the population - kept a low profile, but many now fear that ethnic majority hard-liners are trying to target them.