Police and politicians backed by the country's former strongman Mahinda Rajapaksa joined anti-Musliminfo-icon riots that rocked Sri Lankainfo-icon's Kandy district this month, according to witnesses, officials and CCTV footage reviewed by Reuters.

Scores of Muslim mosques, homes and businesses were destroyed as mobs ran amok for three days in Kandy, the central highlands district previously known for its diversity and tolerance. The government declared a state of emergency and blocked social mediainfo-icon platforms for a week to control the unrest.

The role of police and some local Buddhist politicians suggests the Sri Lankan government lost control of elements of its security forces, and that the violence was more than a spontaneous outbreak fuelled by fringe Buddhist extremists and hate-speech spread on social media.

Rajapaksa has denied that he or other leaders of his party were involved. Police said the allegations against officers and politicians were being investigated.

Victims and witnesses, whose accounts were partly backed by CCTV footage seen by Reuters, described members of an elite paramilitary police unit, the Special Task Force (STF), assaulting Muslim cleric and leaders. Local STF commanders declined to comment.

"They came to attack," said A.H Ramees, a cleric at a mosque where worshippers say they were beaten by police who were supposed to be protecting them. "They were shouting. There was filthy language. They said all the problems were because of usinfo-icon, that we were like terrorists."

Ruwan Gunasekera, a spokesman for the national police force, including the STF, said a special investigation unit was "probing the deficiencies of the police in the incident". A second unit was examining the role of political actors, he said.

The riots were the latest example of rising Buddhist nationalism and anti-Muslim sentiment in the region and have unnerved Sri Lanka's multi-ethnic coalition government, which ousted Rajapaksa in an election in 2015, according to analysts and two sources familiar with the government's deliberations.

Read: Rise of violent Buddhist rhetoric in Asiainfo-icon defies stereotypes

Buddhists make up about 70 per cent of Sri Lanka's 21 million people. Tamils, most of whom are Hindu, account for 13pc while Muslims make up about 9pc of the population.

Sri Lanka's Law and Order Minister Ranjith Madduma Bandara has said the violence in Kandy was "well organised" and pointed the finger at members of Sri Lanka Podujana Peramuna (SLPP), a political party backed by Rajapaksa that scored a huge victory in local electionsinfo-icon last month.

At a press conference flanked by senior leaders earlier this month, Rajapaksa said the accusations were politically motivated. In fact, the government fomented the violence to "get the Muslim vote" and to distract from its inadequacies, he said.

Trigger for violence

The violence in Kandy was triggered by an attack on a Buddhist truck driver, H.G Kumarasinghe, by four Muslim men after a traffic dispute on Feb 22.

As Kumarasinghe lay in a coma, calls for retribution and anti-Islam polemics flooded social media and the government ordered the deployment of 1,000 members of the STF.

Rioting erupted after his funeralinfo-icon 11 days later.

An excerpt of CCTV footage from the first day of attacks reviewed by Reuters showed police letting a large group of men through the cordon protecting the Noor Jummah mosque in Digana, a Kandy township.

The men rush into a multi-storey building opposite the mosque. A local SLPP politician, Samantha Perera, can be seen pointing at the higher floors of the building.

Perera confirmed he was the person shown in the footage. He said he was trying to calm the rioters and only found out later the mosque had been attacked. "I am a good Buddhist. I am not instigating violence against anybody," he said.

Cabinet spokesman Rajitha Senaratne said Perera was under investigation for "attacking Muslim-owned shops and mosques with stones".

At least three other SLPP politicians, including a national politician, were being investigated and another SLPP councillor has been arrested for setting fire to a mosque, he said. All deny any involvement in the violence.

"There's a political motive to discredit me, Mahinda Rajapaksa and the party," Perera said.

'Monster beyond control'

Anti-Muslim sentiment has surged in Sri Lanka since 2009, when a long civil warinfo-icon against Tamil insurgents was brutally ended by Rajapaksa amid charges by a United Nationsinfo-icon panel of experts of human rightsinfo-icon violations, including extrajudicial killings by the military and STF.

Editorial: Sri Lanka violence

As in Myanmarinfo-icon, from where 700,000 Rohingya Muslims have fled an armyinfo-icon crackdown in recent months, Buddhist hardliners in Sri Lanka have argued that Islam is a threat to the Buddhist way of life.

Though the level of violence is not comparable, the Sri Lankan Secretariat for Muslims, a civil society group, logged more than 600 attacks and threats to Muslims in the past five years, according to director Hilmy Ahmed, who added the rate of anti-Muslim violence had accelerated in the recent years.

"The fear that Muslims are going to take over, are going to deprive you of your welfare, is so widespread," he said.

Veteran political analyst Jayadeva Uyangoda said Buddhist chauvinism in Sri Lanka was a "monster beyond control", as local activists draw inspiration from the Buddhist extremists in Myanmar and Hindu radicals in Indiainfo-icon hostile to Muslims.

'Can you believe it?'

About 10 minutes after the incident near the Noor Jummah mosque shown in the CCTV footage, the mob returned via a back road, out of the line of sight of the mosque's exterior cameras, and threw a petrol bomb into the mosque's first floor office, according to witnesses Mohamed Niyaskhan, who said he was beaten and left bloodied, and the mosque secretary M.I.M Shukry.

Niyaskhan said earlier that day he had prepared foodinfo-icon and drinks for STF members protecting the mosque, but they had left shortly before the attack.

"No STF, no police were there," he said. "They had gone around the corner. Can you believe it?"

Later that day, eight to 10 members of the STF rushed the Hijrapura mosque, also in Digana, according to clerics and worshippers.

The police assaulted worshippers with batons, according to Ramees, the cleric.

CCTV footage shows police in riot gear striking Ramees and another cleric, M.S.M Nizam, four times with batons. A local Buddhist monk, Gerendigala Chanda Wimala, told Reuters he saw the men being manhandled by police and successfully demanded their release.

At about the same time, a local Muslim politician, Abdul Saleem Mohamad Fazil, and a friend Mohamad Faizal, were also attacked by members of the elite police unit, according to the victims and a witness, Father Christy Paul, the prelate at Digana's Catholic church.

"Three STFs came through the back entrance of the house and started beating us," said Fazil, who suffered a deep head wound and said he spent a night in prison after being refused medical treatment. "They grabbed some bottles from the landing and put them in a bag and said we were making petrol bombs."

Father Christy said he heard the men's screams and saw the police hitting them with batons. The men were cowering on the ground and not offering any resistance to the police, he said.

Police say they have arrested more than 300 people involved in the riots.