Sri Lanka's President Maithripala Sirisena flew to the island's former warzone of Jaffna on Tuesday to defuse rising tensions over the gang rape and murder of a teenager, a spokesman said.
Sirisena met relatives of the 17-year-old school girl killed in the minority Tamil stronghold in the island's north two weeks ago, an incident that sparked clashes between residents and police, who were accused of failing to act swiftly.
"The president invited the mother and brother of the victim to lunch with him and promised speedy legal action against the perpetrators," Sirisena's spokesman Dharmasri Bandara told AFP.
The unannounced visit to Jaffna, 400 kilometres (250 miles) north of Colombo, came as police obtained a new court order banning protests for two more weeks fearing further mob violence, after obtaining a similar ruling last week.
However, in the capital Colombo, hundreds of activists staged a peaceful demonstration at a busy intersection to condemn the rape and killing and demanded tough action against those responsible.
"Justice delayed is justice denied, expedite judgments in all rape cases," said a placard carried by two activists.
Sri Lankan courts are notoriously slow and some rape cases are dragged out for 10 years.
Enraged local residents pelted stones at police and a local court house in the Jaffna peninsula last week after the girl's bruised body was found near her home on May 14, one day after she went missing.
Police responded by firing tear gas at the protesters and arresting 130 people who took part, a move that residents said only fuelled anger.
Police said they have since taken nine men into custody but tensions remain high.
The girl's hands and feet were bound and local media have said she was suffocated, although an autopsy report has not been released.
The protests were a rare public outburst of anger in Jaffna since the end of the decades-long separatist war in 2009 between Tamil rebels and the military that left at least 100,000 people dead.
Dharmasri said the president also met with about 200 girls from 17 schools in the Jaffna district to address any safety concerns.
"The president took questions from them and also promised better infrastructure for schools in the area," Dharmasri said.
Police have said the main suspect in the murder is a Swiss national of Sri Lankan origin. The Swiss embassy has said, however, he was a Sri Lankan with a residence permit for Switzerland.
The government has said three senior officers have been transferred from their stations in Jaffna, pending an internal investigation into police handling of the crime.
Sirisena, who came to power in January, has promised to reform the criminal justice system and ensure swift punishment for offenders.
Official figures show about 2,200 cases of rape and other forms of serious violence against women and children are reported annually.