BEIRUT—One weekend two years ago, in the middle of the security crisis caused by the extremist Islamic State group, fighting broke out in northern Iraq around the town of Tuz Khurmatu between members of the Iraqi Kurdish military and fighters from Iraq’s Shiite Muslim militia. Never mind that they were supposed to be allies fighting ISIS.

This kind of tussle wasn’t something new in Tuz Khurmatu. The two groups held long-standing grudges and shots had been fired in anger before. What was new was the role that Facebook played.

Cheerleaders for both sides had been posting pictures and videos, allegedly from Tuz Khurmatu: burning tanks, battle action and a truck filled with dead men. Various mainstream Iraqi media picked up on those posts; some broadcast them on television.

Then, as Khalif Awaf, one of the leaders of the local Shiite militias there, recalls he and his men read on Facebook that the Kurds were sending tanks and special counter-terrorism forces.Things were looking bad. Really bad. And Awad’s men geared up to keep fighting.

But just to make sure he knew what was happening in the real world, not the Facebook world, Awaf called the mayor of Tuz Khurmatu to confirm that the Kurds were indeed sending in heavy artillery. “He told us it was a lie,” as Awaf told a journalist from nearby Kirkuk.

The shooting stopped and eventually, Awaf says, “We asked the Iraqi Commission for Media and Communication to block social media within Kirkuk and Tuz Khurmatu because the sites were just being used to spread lies about both sides.”

Afterwards soldiers from the Kurdish and Shiite forces all said they believed that the false reports on Facebook may have prolonged a conflict that, in the end, killed some 60 people.

That wasn’t the first such incident in Iraq and it wouldn’t be the last, as Iraq, like other fledgling democracies, learns just how dangerous social media can be in environments where fake news, especially on Facebook, can have fatal consequences.

The most conspicuous case is in Myanmar (Burma), where many human rights organizations blame racist rabble rousing and conspiracy theories spread on Facebook for the campaign of ethnic cleansing against the Rohingya that has reached nearly genocidal proportions.

When Facebook chief Mark Zuckerberg appeared before Congress, he faced a few questions about whether his company was complicit in Myanmar’s tragedy, and Zuckerberg, continuing his mea culpa tour, conceded there was a problem and vowed to work harder to block hate speech—there. But this is not a Burmese issue, this is a global problem. And nobody knows that better than the people of Iraq, who were given freedom of speech by the U.S.-led invasion that toppled totalitarian tyrant Saddam Hussein in 2003 only to be blindsided by the rise of wildly irresponsible posts on social media.

Since 2003 there has been an explosion of media outlets in Iraq, resulting in a plethora of published and broadcast opinion and hugely differing reporting standards. Moreover, because there is no real advertising industry and no significant way for Iraqi media to generate revenue, a lot of local outlets are funded by individuals or groups with specific religious, political or ethnic agendas. The content reflects that.

Iraqis are well aware of the problems with what pass for their mainstream media, which is why, even though TV is still the most popular conveyor of information in the country, reports shared by friends and relatives via Facebook are often just as important—possibly even more important.

“ When Mark Zuckerberg appeared before Congress, he faced a few questions about whether his company was complicit in Myanmar’s tragedy. But this is not just a Burmese issue, this is a global problem. ”

Over half of all Iraqis go online regularly and around a third of the population—an estimated 14 million Iraqis—are on Facebook. The real figure may be even higher because, according to 2016 numbers, about half of Iraqis use smartphones to access the Internet. One of the biggest mobile service providers in Iraq, Zain, makes a point of telling users it offers Facebook for free.

As a result, in Iraq Facebook is not just an adjunct to online life, it is online life. Up until recently, when YouTube started to compete, Facebook had a monopoly on Iraqi social media. It is used to catch up on current affairs, message friends, order meals, and to shop for everything from lingerie to guns.

But as a business, Facebook obviously has an agenda that is about more than just connecting people. Facebook’s “core functions are to deploy its algorithms to amplify content that generates strong emotional responses among its users and then convert what it learns about our interests and desires into targeted ads,” writes Siva Vaidhyanathan, director of the Center for Media and Citizenship at the University of Virginia. In Iraq, those strong emotional responses can easily result in a shooting match.

Belief in Facebook posts is almost a matter of faith. “Unlike in Europe, there is only a small increase in skepticism about what we see on Facebook,” notes Mustafa Habib, a Baghdad-based journalist who writes regularly about his country’s fake news problem. “But that’s mostly among over-30s. Many younger Iraqis, especially teenagers, see Facebook as their primary source of information. And that’s important because they are the largest age group in the country.

Equally critical: Iraq’s mainstream media regularly re-publish social media posts for their millions-strong audiences. Often, nobody checks the provenance. This may be because the media outlet did not have reporters on the ground. Or it may be because the misleading post supports the media outlet’s own bias. There’s no media watchdog with any teeth in Iraq and usually no reprimand if somebody gets it wrong. Misleading news items, based on misleading social media, stay online for days; sometimes they’re never corrected.

The events of last October in and around Iraqi Kurdistan are yet another example of that perfect online storm: A combination of wider digital trends, bad actors, locals in filter bubbles with long-entrenched opinions, a loss of trust in legacy media (or in Iraq’s case, the almost complete absence of it) and a business based thousands of miles away that takes no real responsibility for its impact in-country.

After the country’s Kurdish minority held a much-debated referendum in September on whether to secede from the rest of Iraq or not, the Iraqi government pushed back. In mid-October, Baghdad sent troops north to re-take territory the Kurds controlled and defended during the ISIS security crisis.

Propagandists from both sides of the argument went nuts, as did local media outlets with an agenda. In fact, there are indications that multiple, smaller versions of “troll factories” now exist in Iraq, where individuals with an agenda hire young, Internet-savvy Iraqis to put out disinformation that causes chaos which they can then exploit for their own ends.

For instance, last October, videos on Facebook and YouTube showed a huge convoy of Iraqi military vehicles heading north. At the same time, Kurdish leaders were busy blaming one another for the debacle of the independence referendum. Local TV backed their owners—the very politicians who were arguing—and couldn’t be trusted. So posts like the military convoy video were widely shared on social media.

In some places confused Kurdish soldiers fought back, in others they didn’t. In some places civilians armed themselves and went to fight the incoming “oppressors.” In others, they packed up their houses and fled.

“ Facebook’s 'attention economy' business model—which gets users to react to posts so it can gather their data—certainly gets results in Iraq when pre-existing social divisions are exploited. ”

This is all despite the fact that the video showing troop movements that actually took place several months before—a clip of the Iraqi army heading to Mosul to fight the Islamic State.

“Media bias, photo-shopped pictures and fake pictures are flooding in because the situation is so tense,” Karim al Nouri, a spokesperson from the Shiite Muslim militias in the area, told journalists at the time. “This has led to increased tensions and a surge in fighting between us. At the same time, it has also created a lot of fear and anxiety for civilians and has led, in some cases, to people fleeing their homes.”

So can Facebook be blamed for all that? Not all of it, or course. Iraq has its own politics, history, indigenous conflicts and almost 40 million human beings, all of whom also have agency. But Facebook’s “attention economy” business model—which gets users to react to posts so it can gather their data —certainly gets results in Iraq when those pre-existing social divisions are exploited.

The problem is extremely difficult for the Iraqi government to regulate and it has tended to react with blunt force. For example, last year it “turned off” the Internet for everyone, just by switching off servers, to prevent students from cheating on exams. In 2014, it did the same to prevent the spread of ISIS propaganda on platforms like Facebook and YouTube.

As Mark Zuckerberg told the US Congress, Facebook will try to “do better” by changing its algorithms. In the past, the tech giant has said it would fight “fake news” by promoting more “trusted sources” on its platform, legacy media like the New York Times and the BBC. But it’s unclear how that would help in Iraq, where one would be hard pressed to find an outlet that has equivalent editorial standards.

Two weeks ago, Cambridge Analytica whistle-blower Christopher Wylie put his finger on the problem when he told the British parliament that his former employer, working with Facebook, “undermines civic institutions of countries that are struggling to develop those institutions.”

Iraq is holding all-important federal elections in May. Given that Facebook has announced plans to expand further into unexploited territories like Iraq, and considering that young people in Asia, Africa and the Middle East are some of the most enthusiastic, uncritical users of social media, Facebook’s problems are likely to get a lot worse in those parts of the world before they get better, and so are the risks those problems pose to the public.