On Sunday, a man walked into a pizzeria in Washington, DC, with an assault rifle and fired one or more shots.

The scene, thankfully, was not another example of a mass shooting — no one was injured or killed. Instead, it was the result of a fake news story about Hillary Clinton’s 2016 presidential campaign that proliferated on social media in the weeks before Election Day.

The totally false conspiracy theory claims that Hillary Clinton and her former campaign chair, John Podesta, ran a child sex ring at the basement of a pizzeria in DC, Comet Ping Pong (which doesn’t even have a basement). Over the past few weeks, Donald Trump supporters and white supremacists on social media have pushed the conspiracy theory — leading to headlines like “Pizzagate: How 4Chan Uncovered the Sick World of Washington’s Occult Elite” on fake news websites.

The Sunday shooting was far from the beginning of threats that Comet Ping Pong has faced over the past few weeks. Cecilia Kang reported at the New York Times that the restaurant’s staff and its owner, James Alefantis, have faced a barrage of abuse and death threats on social media as a result of the conspiracy theory. Things have gotten so bad that the general manager’s wife asked him to quit. Alefantis has worked to get the FBI and local police involved in an investigation to stop the conspiracy theory’s spread, and requested that social media platforms like Facebook, Twitter, and Reddit take down messages and pictures related to the false conspiracy theory.

But it has persisted. Bryce Reh, Comet’s general manager, characterized trying to take down the conspiracy theory online as “trying to shoot a swarm of bees with one gun.” Yet as Pizzagate continues spreading online, it becomes more and more clear just how big of a problem fake news now poses — and how difficult it may be to address.

Pizzagate has been pushed by Trump supporters and white supremacists

Really love that this #pizzagate infographic bothers to say “it’s not actually that crazy" pic.twitter.com/AcZBC2SR0Q — Nick Wing (@nickpwing) December 5, 2016

Like many ridiculous things on the internet, Pizzagate appears to have begun on the troll haven and message board 4chan. After Podesta’s emails were hacked (likely by Russian agents) and WikiLeaks published them, 4chan users in October found emails between Podesta and Alefantis about a Clinton fundraiser that happened early in the campaign.

From there, people began speculating without any evidence that the restaurant was part of a broader child trafficking ring run by the Democratic Party — a popular but entirely false conspiracy theory on the fringes of conservative media. The conspiracy theories jumped over to Reddit, where the popular Trump subreddit r/The_Donald championed it; Twitter, where pro-Trump tweeters (including the son of Trump’s pick for national security adviser) have continued to promote it; and Facebook, where fake news outlets have written and shared articles about it.

And Alex Jones, the head of the fake news InfoWars who once argued that President Barack Obama and Clinton are literally demons, also boosted the conspiracy theory, saying on his show (in a video that was published in early November but later taken down) that “Hillary Clinton has personally murdered children.” That video earned more than 420,000 videos before it was removed.

Here is one example of a fake news outlet promoting the conspiracy theories behind Pizzagate, keeping in mind that the story is entirely false and the FBI has not confirmed anything about Pizzagate or related conspiracy theories because they’re all wrong:

Craig Silverman at BuzzFeed has an exhaustive report on how these ridiculous conspiracy theories got so big.

They appeared to really take off after a white supremacist Twitter account (which uses an avatar of a Jewish lawyer in New York) propped them up. The tweet pointed to a Facebook post that claimed a likely nonexistent “NYPD source” confirmed that police had found evidence on former Rep. Anthony Weiner’s devices that the Clinton campaign ran an international child enslavement ring. Again, there’s absolutely no evidence for any of this — but the tweet, which is still up, quickly got thousands of retweets and favorites.

Rumors stirring in the NYPD that Huma's emails point to a pedophila ring and @HillaryClinton is at the center. #GoHillary #PodestaEmails23 pic.twitter.com/gkEH5oL269 — David Goldberg (@DavidGoldbergNY) October 30, 2016

With that, fake news outlets like Your News Wire pushed the story more broadly just days before Election Day. One of the stories even claimed, “IT’S OVER: NYPD Just Raided Hillary’s Property! What They Found Will RUIN HER LIFE.” New York police officers did not raid Clinton’s property, but the story quickly got more than 100,000 engagements — shares, reactions, and comments — on Facebook, and it was quickly plagiarized by multiple fake news outlets to get hundreds of thousands more engagements on social media.

The nonsense just kept building and building, with fake news outlets running more and more false details about this false conspiracy theory — typically alleging that police, particularly the NYPD and FBI, had uncovered even more evidence of this international child abuse ring, even though no such thing had happened.

As all of this spread, pro-Trump supporters went back to the Podesta emails published by WikiLeaks to find more “clues” for Pizzagate and other conspiracy theories. Without any evidence or cause, they quickly began to interpret basic food items as code words for this supposed sex ring. Through this new ridiculous “discovery,” Trump supporters on social media linked even more emails to Pizzagate, which grew from a conspiracy theory about a DC pizzeria to one about a fictitious international child sex ring.

Search all Podesta emails for these keywords. We are uncovering a child sex ring.#PodestaEmails28 pic.twitter.com/h6N6O76sAw — Jared Wyand (@JaredWyand) November 3, 2016

But communications between the Clinton campaign and Comet Ping Pong’s Alefantis were the original source of the Pizzagate speculation. And the allegations were further emboldened by the pizzeria’s ties to the Clinton campaign, including Alefantis’s former relationship with David Brock, who founded the liberal media watchdog group Media Matters and publicly supported Clinton.

So the DC pizzeria bore the brunt of the damage that came from these widespread conspiracy theories. Starting the weekend before Election Day, the restaurant and its staff got hundreds of death threats on their phones and social media — including one that read, “I will kill you personally.” People also began showing up at Comet Ping Pong to investigate. Some people alleged Comet was working with nearby businesses to maintain the nonexistent child sex ring. Then, on Sunday, Edgar Maddison Welch, a 28-year-old from North Carolina, armed himself with an assault rifle and fired at least one shot in the restaurant while investigating the conspiracy theory.

After the latest scare, Alefantis asked people on Sunday to stop spreading all this nonsense about his pizzeria: “I really hope that all of these people fanning the flames of this conspiracy would take a moment to contemplate what has gone on here today and maybe to stop.”

Welch, for his part, told the New York Times that he now regrets what he did. “I just wanted to do some good and went about it the wrong way,” he said. “I regret how I handled the situation.”

But ultimately, this is about much more than one pizzeria and conspiracy theory.

Fake news has become a big problem on social media

While Pizzagate has quickly become the most high-profile example of fake news going seriously wrong, it is part of a much broader problem with fake news that has quickly become widely recognized in the aftermath of the 2016 election.

Here’s one example of just how widespread fake news is: Over at BuzzFeed, Craig Silverman pit Facebook engagement for the top 20 fake news stories — like “Pope Francis shocks world, endorses Donald Trump for president” (he did not) and “FBI agent suspected in Hillary email leaks found dead in apartment in murder-suicide” (this did not happen) — against the top 20 legitimate news stories, from outlets like the New York Times and Huffington Post. In the last three months of the election, the fake news stories got more Facebook engagements than the legitimate news outlets.

So why did these outlets suddenly pop up and push fake news in time for the election? Some of it is political: Some people are willing to do anything they can, including lie, to make sure their candidate wins.

But there’s also a financial interest in fake news. A BuzzFeed investigation found that many of the big fake news stories originated from a tiny Macedonian town known as Veles. There, young Macedonians have embraced “a digital gold rush” by setting up fake news sites and using Facebook as a platform to push their false stories, reaping the advertising dollars that come with the clicks and sharing.

Silverman and Lawrence Alexander wrote for BuzzFeed, “Several teens and young men who run these sites told BuzzFeed News that they learned the best way to generate traffic is to get their politics stories to spread on Facebook — and the best way to generate shares on Facebook is to publish sensationalist and often false content that caters to Trump supporters.”

There’s a reason these websites have a partisan, pro-Trump bent: At least in the 2016 election cycle, fake news took off much more with conservatives than with liberals. Laura Sydell reported at NPR the experience of one fake news purveyor, 40-year-old Jestin Coler in California:

During the run-up to the presidential election, fake news really took off. "It was just anybody with a blog can get on there and find a big, huge Facebook group of kind of rabid Trump supporters just waiting to eat up this red meat that they're about to get served," Coler says. "It caused an explosion in the number of sites. I mean, my gosh, the number of just fake accounts on Facebook exploded during the Trump election." Coler says his writers have tried to write fake news for liberals — but they just never take the bait.

Why is this the case? Coler suggested that it has to do with Trump and conservative media outlets discrediting mainstream news, pushing conservatives to look for other outlets for their information: “This is a right-wing issue. Sarah Palin's famous blasting of the lamestream media is kind of record and testament to the rise of these kinds of people. The post-fact era is what I would refer to it as. This isn't something that started with Trump. This is something that's been in the works for a while. His whole campaign was this thing of discrediting mainstream media sources, which is one of those dog whistles to his supporters.”

Welch, the man who investigated Comet Ping Pong, echoed this kind of sentiment. Adam Goldman reported for the New York Times: “He said he did not like the term fake news, believing it was meant to diminish stories outside the mainstream media, which he does not completely trust.” But Welch also claimed that he wasn’t political: He said he didn’t vote for Trump or Clinton, although he was once registered Republican.

Not all fake news is geared toward conservatives. Jeremy Stahl at Slate pointed out that some liberals have seized on a few false stories, including those that hyped up Bernie Sanders’s chances in the Democratic primary and blamed his loss on widespread voter suppression. But it does seem like the biggest fake news hits of the 2016 election were by and large geared for Trump supporters, with headlines like “IT’S OVER: Hillary’s ISIS Email Just Leaked & It's Worse Than Anyone Could Have Imagined” and “Just Read the Law: Hillary Is Disqualified From Holding Any Federal Office” dominating the most shared fake news stories of the last three months of the election.

Wherever it lands on the political spectrum, all of this fake news has created a big problem: Many people are now getting completely false information from fake news outlets that pose as legitimate, making it hard for readers to know if the information is legitimate.

So the rapid spread of fake news has led people to demand that social media platforms, particularly Facebook, and Google do something to halt the spread of fake news.

Google and Facebook have promised some action to counter fake news

Google responded in November, announcing that it was cutting off fake news sites from its huge advertising network. Facebook followed suit by vowing to block fake news outlets within its own ad network.

Still, Facebook has at times been resistant to do much more — like making sure that fake news doesn’t pop up in someone’s Facebook feed in the first place. Facebook CEO Mark Zuckerberg, for example, suggested that fake news wasn’t much of an issue to begin with, writing in a Facebook post (without evidence for his numbers) that “more than 99% of what people see [on Facebook] is authentic. Only a very small amount is fake news and hoaxes.”

But Facebook now seems to be acknowledging that it needs to do something.

“For so long, we had resisted having standards about whether something’s newsworthy because we did not consider ourselves a service that was predominantly for the distribution of news. And that was wrong,” Facebook executive Elliot Schrage said at a panel in Massachusetts last week. “We have a responsibility here. I think we recognize that. This has been a learning for us.”

“We have a responsibility here. I think we recognize that. This has been a learning for us.”

The bad news: Facebook doesn’t seem to have an idea about what it will do yet. The big problem seems to be that the social media platform just doesn’t want to get into heavily policing people’s own posts and feeds, especially in a way that could come off as partisan or as censorship.

But Facebook is also now the main way many Americans and people around the world share and read the news. That has led to a democratization of media, which means that new legitimate news sites like Vox can build a big audience and even compete with established outlets like the New York Times, but also that a fake news site can as well.

As Tim Lee explained for Vox, “Stories like this thrive on Facebook because Facebook’s algorithm prioritizes ‘engagement’ — and a reliable way to get readers to engage is by making up outrageous nonsense about politicians they don’t like.”

So the platform needs to take some more responsibility for what it’s doing.

Ultimately, Facebook seems to be coming around to some sort of system that would nudge users to act differently without actively blacklisting or favoring certain sites. “We’re in the business of giving users the power to share. Part of that is helping them share thoughtfully and responsibly, and consume thoughtfully and responsibly,” Schrage said, offering few details for how exactly this would work.

Whatever Facebook and others do, some of it will come too late. Not only did fake news appear to convince a gunman to fire off bullets at a DC pizzeria, but the rise of fake news prior to Election Day suggests it may have helped Trump get elected.

Watch: It’s now on America’s institutions — and Republicans — to check Donald Trump