Three months after Sri Lanka was rocked by deadly anti-Muslim riots fuelled by online vitriol, Facebook is training its staff to identify inflammatory content in the country's local languages.
The social network has been seeking penance in Sri Lanka after authorities blocked Facebook in March as incendiary posts by Buddhist hardliners fanned religious violence that left three people dead and reduced hundreds of mosques, homes and businesses to ashes.
Until the week-long ban, appeals to Facebook to act against the contagion of hate speech had been met with deafening silence, at a time when the California-based tech giant was reeling from unprecedented global scrutiny over fake news and user privacy.
"We did make mistakes and we were slow," Facebook spokeswoman Amrit Ahuja told AFP in Colombo.
The dearth of staff fluent in Sinhala -- the language spoken by Sri Lanka's largest ethnic group -- compounded the issue, with government officials and activists saying the oversight allowed extremist content to flourish undetected on the platform.
Ahuja said Facebook was committed to hiring more Sinhala speakers but declined to say how many were currently employed in Sri Lanka.
"This is the problem we are trying to address with Facebook. They need more Sinhala resources", said the island's telecommunications minister Harin Fernando.
Since the violence broke out in March, two high-level delegations from the company have visited Sri Lanka, where ethnic divisions linger after decades of war, to assure the government of its intent.
Ahuja said Facebook was working with civil society organisations to familiarise its staff with Sinhala slurs and racist epithets.
Complex local nuances have added to the challenge. The word for "brother" in Tamil -- also an official language in the country -- can be a derogatory term in Sinhala when a slight inflection is used.
Fernando said the decision to impose an island-wide blackout on Facebook -- used by one in three Sri Lankans -- was taken as a last resort to prevent an escalation of violence.
Buddhist monks freely shared images of masked men attacking mosques and urged others to do the same in the weeks before the riots erupted in Kandy.
Sinhala extremists used the social network to recruit rioters and organise their travel to the troubled area, from where violence later spread.
A meme in Sinhala, which remained online for weeks, urged death to all Muslims, including children.
A man who reported it to Facebook was told it did not violate "specific community standards".
In addition to government warnings, Fernando told AFP that Facebook users lodged thousands of complaints over extremist content, but were met with silence.
"It was not something that I liked doing. But if we didn't block Facebook, the violence would have spread out of control," he said.
Eventually the army was given special powers to restore order under the first state of emergency declared in the 21-million-strong nation since the end of the civil war in 2009.
Ahuja said Facebook has since taken down "hate figures and organisations" in Sri Lanka including the Bodu Bala Sena, a radical Buddhist outfit that is blamed for attacks against Muslims in recent years.
Its spokesman Dilantha Withanage complained the group and its leader -- the notorious extremist monk Galagoda Aththe Gnanasara -- were being unfairly targeted.
"We can't even post a photo of venerable Gnanasara on Facebook," Withanage told AFP.
But videos of his sermons can still be seen on the social network. Other extremists have also slipped through the cracks, activists say, despite repeated requests to have their accounts removed.
Last year another extremist Buddhist group, Sinhale Jathika Balamuluwa, urged followers via Facebook Live to storm a UN compound sheltering Rohingya Muslims. Police had to be called in to protect the refugees from the mob.
Several Facebook pages for the group have been blocked in Sri Lanka but the same content can be viewed under alternate names, activists say.
"Facebook is only now being held to account over things that since 2013 were evident...(to) us," said Sanjana Hattotuwa, a researcher who has studied Islamophobia on Facebook in Sri Lanka.
Sri Lanka's Centre for Policy Alternatives said Facebook needed to offer more than "cookie cutter" pledges to clean up its act.
"The time for promises has passed. Action is what's needed, and transparency and accountability," said Hattotuwa.