The riots wouldn’t have happened without Facebook.

On the the evening of July 2, 2014 a swelling mob of hundreds of angry residents gathered around the Sun Teashop filling the streets in the commercial hub of Mandalay, Myanmar’s second-largest city. The teashop’s Muslim owner had been accused, falsely, of raping a female Buddhist employee.

The accusations against him, originally reported on a blog, exploded when they made its way to Facebook—by then, synonymous with the internet in Myanmar. Many among the crowd had seen the Facebook post, which was widely shared including by a Mandalay-based ultra-nationalist monk named Wirathu, who has a massive following across the country.

As anger rose among the throngs of men, police struggled to disperse the growing crowds, firing rubber bullets and trying to corral rioters into certain sections of the city. Their efforts were largely unsuccessful. Soon, armed men were marauding through the streets of the royal capital on motorbikes and by foot wielding machetes and sticks. Rioters torched cars and ransacked shops.

A curfew was imposed in the city and surrounding townships. Authorities were fearful that the violence would spread to other towns that had seen outbreaks of religious violence the previous year. The mayhem did not spread, but during the multi-day melee in Mandalay two men—one Muslim and one Buddhist—were killed and around 20 others were injured.

The unrest was the latest in a string of flare-ups, often violent, between minority Muslims and Buddhists in the majority-Buddhist country of around 51 million since restrictions on free speech and the internet were steadily loosened starting in 2010. Waves of violence broke out in the western Rakhine state in 2012 between Muslims and Buddhists, leaving nearly 200 dead and displaced some 140,000, mainly Rohingya Muslims and reverberated across the country in the months and years that followed.

A firefighter sprays a smoldering building in the wake of clashes between Buddhists and Muslims that left at least 20 people dead in a the central Myanmar town of Meikhtila in 2013. Khin Maung Win/AP After the unrest, which left scores of buildings in flames, Myanmar’s army took control in the city. Khin Maung Win/AP

In Naypyitaw, the country’s vast capital some 170 miles south of Mandalay, government officials quickly realized the seriousness of the unfolding situation. Chris Tun, the head of Deloitte’s Myanmar operations and a longtime member of the country’s tech community, received a frantic phone call. On the line was Zaw Htay, a senior official in the office of President Thein Sein, a retired general who until a few years earlier had served as the fourth most powerful figure in the junta and a loyal comrade to dictator Than Shwe.

Thein Sein’s military-backed party suffered a near-total defeat by Aung San Suu Kyi’s National League for Democracy at the polls in November 2015. His term ended in March 2016. Aung San Suu Kyi, who is barred by the constitution from holding the presidency, serves as the country’s de facto leader with the title of State Counsellor. But the military is not under civilian oversight and retains an outsized role in the country’s political arena, controlling a quarter of all parliament seats as well as three key ministries.

Desperate for a way to stem the mayhem, Zaw Htay asked Tun—who worked previously in the United States and was involved in the US-ASEAN Business council, a Washington-based lobbying group focused on Southeast Asia—to try to contact Facebook on behalf of the President’s Office to see if anything could be done to halt the spread of disinformation.