Facebook shrugged off months of criticism from regulators and privacy experts Wednesday with record quarterly revenue, revealing advertisers are still flocking to the site.

Facebook, which also owns Instagram and WhatsApp, said its third-quarter revenue grew by 29 percent to $17.7 billion. The company’s revenue is driven almost entirely by advertising. Those numbers beat estimates from S&P Global Market Intelligence of $17.35 billion. Net profit grew 19 percent from the same period a year earlier to $6.1 billion.

The number of users on all of Facebook’s platforms combined has grown more slowly than revenue. In the third quarter, monthly active users were up 8 percent to 2.45 billion year-over-year. The company’s daily active user numbers beat expectations slightly, with 9 percent growth year-over-year to 1.62 billion.

“Now we have a clear path forward, not just in terms of product and business, but in terms of guidance from regulators, which sets clear expectations and gives us a foundation to build on,” chief executive Mark Zuckerberg said during a call with analysts.

On the earnings call, Zuckerberg said the company will continue to accept political ads, which he estimated will account for 0.5 percent of the company’s revenue next year. His comments came the same day Twitter CEO Jack Dorsey announced the platform would ban all political ads beginning in November.

Zuckerberg insisted that the policy is based on its commitment to free speech, not concerns about its bottom line. Democratic presidential candidates and others criticized Facebook earlier this month for declining to remove a Trump campaign ad that contained multiple falsehoods.

“In a democracy, I don’t think it’s right for private companies to censor politicians or the news,” he said.

“This isn’t about free expression,” Twitter’s Dorsey tweeted. “This is about paying for reach. And paying to increase the reach of political speech has significant ramifications that today’s democratic infrastructure may not be prepared to handle. It’s worth stepping back in order to address.”

The past few months have been among the rockiest in Facebook’s 15-year history. In July, the U.S. Federal Trade Commission slapped Facebook with a historic $5 billion fine for repeated privacy violations. The agency levied a fine after a 16-month investigation stemming from the Cambridge Analytica scandal, in which a political consultancy with ties to the Trump presidential campaign improperly accessed the data of tens of millions of Facebook users. The company’s plan to disrupt the financial system with a not-yet-available cryptocurrency called Libra has received an icy reception from regulators and triggered a wave of accounts falsely purporting to sell the currency.

But advertisers care most about being able to target large numbers of people with extremely precise tools, said Debra Aho Williamson, an analyst at research firm eMarketer. Despite Facebook’s setbacks and scandals, she says, it’s clear that advertisers still believe the platform delivers on those promises.

“Facebook is a company that is able to execute on the metrics that matter even though there are many, many major challenges in other areas,” she said.

The company’s stock price has been volatile over the past year, reaching a low of $123.02 a share in December and a high of $208.66 in July. On Wednesday, Facebook’s stock price was up 4.5 percent in after-hours trading on the earnings.

“There’s more external pressure [on Facebook] because there’s a view that the walls are closing in from a regulatory perspective, but investors only care about results,” said Daniel Ives, a managing director and analyst at Wedbush Securities. “Investors are laser-focused on its strategy going forward, on balancing advertising growth with privacy issues, which continues to be a tightrope that Zuckerberg is trying to walk.”

Chief Financial Officer David Wehner said increased emphasis on privacy from regulators, operating systems and the company itself may make it more difficult for advertisers to target their audience and could slow Facebook’s revenue growth. For example, Apple’s latest operating system, iOS 13, reminds users which apps are tracking them via their location data.

It’s been a particularly troubling month for Facebook, though analysts seemed confident Tuesday that advertisers would stick with the platform in the wake of one setback after another. Facebook was dealt a blow by the European Union’s highest court, which determined that the social media company can be ordered to remove content worldwide. Facebook also said in October that Russian-backed accounts are sowing political discord on the platform in the run-up to the 2020 U.S. presidential election. Congress criticized nearly every aspect of the company’s business at a hearing held a few days later. Facebook also learned this month that 46 state attorneys general have joined an antitrust investigation of the company led by New York. The state probe comes in addition to the federal government’s review of the company and its past acquisitions, WhatsApp and Instagram.

Asked about the antitrust investigation and probe, Zuckerberg said the success of platforms like Snapchat shows that the industry remains competitive. He also said he expects regulators to focus primarily on Facebook’s 2012 acquisition of Instagram, which he said Facebook saw as both a competitor and a business that would be “complementary” to its own.

Yet Facebook remains the largest social media site in the world and continues to reinvent itself in a rapidly evolving tech landscape. The company says it is increasingly focused on privacy and plans to add end-to-end encryption to all of its messaging products, a move that has attracted positive attention from privacy experts but also raised the ire of regulators. Facebook has also begun compensating some news outlets for the stories it has historically republished for free on its News Tab.

As has been the case in quarters past, the company’s user growth is concentrated primarily in areas outside the United States, Canada and Europe, with a strong increase in the Asia-Pacific region.