Facebook's efforts to curtail the spread of misinformation on its services were put through their biggest test yet on Tuesday by the U.S. midterm elections.

For the most part, the company came through unscathed.

It's a major achievement for Facebook, which has spent much of the past two years facing questions over its efforts to curtail the spread of fake news, propaganda, hate speech and spam on its services. Academics and researchers criticized Facebook for not doing enough to block harmful content before the 2016 U.S. elections.

Most visibly, the company set up a "war room" to fight the spread of misinformation. Although Fortune and others criticized it as a publicity stunt, the Facebook war room is made up of 20 people from Facebook's various divisions — including WhatsApp, Instagram and others -- dedicated to identifying and removing false and fake accounts trying to influence the U.S. midterm elections.

Behind the scenes, Facebook has hired thousands of staffers and contractors since 2016 to review and remove harmful content. The company now has 7,500 content moderators — up from 4,500 in May 2017 — who are part of a team of 20,000 people working on safety and security. Those moderators work in conjunction with AI systems that the company has built "that can flag content that might be problematic," Zuckerberg told analysts during the company's earnings call last week.

As Election Day approached, Facebook stepped up its work. In the two weeks leading up to Tuesday, the company removed hundreds of accounts and pages engaged in "coordinated inauthentic behavior." On Monday night , Facebook said that it had removed more than 100 accounts linked to the Internet Research Agency, a Russian organization which was accused earlier this year by Special counsel Robert Mueller of being "engaged in operations to interfere with the elections and political processes."

On Election Day, the company was actively removing content that offered inaccurate voting information, including posts and memes directing Americans to vote on wrong days and content spreading a false claim that ICE agents were stationed at polling locations.

"Our teams worked around the clock during the midterms to reduce the spread of misinformation, thwart efforts to discourage people from voting, and deal with issues of hate on our services," a spokeswoman for Facebook told CNBC.

"There's still more work to do, as many of these bad actors are well-funded and change their tactics as we improve. It's why we continue to invest heavily in security, and are working more closely with governments, as well as other tech companies, to help prevent the spread of misinformation and outside interference in elections globally."