Investors pummeled Twitter Inc.’s stock in Friday trading as the company reported that user growth had turned negative, even as its quarterly results beat Wall Street expectations on the top and bottom lines.

Twitter shares TWTR, -4.83% fell 21% during Friday’s regular session to close at $34.13. Before Friday’s losses, the stock had gained roughly 80% this year, while the S&P 500 index SPX, +0.29% climbed 6.1%. Twitter’s Friday decline was even greater that the near 20% loss Facebook Inc. FB, +0.20% shares suffered after that company’s “nightmare” guidance issued by executives on its Wednesday earnings call, though Twitter’s market cap loss of $6.6 billion paled in comparison to Facebook’s $120 billion decline.

Twitter posted a profit for the third consecutive quarter, with its $134 million in net income equating to 13 cents a share. Adjusted per-share earnings came to 17 cents. The FactSet consensus estimate had been 16 cents. Twitter’s revenue climbed 24% to $710.5 million to beat the FactSet consensus estimate by about $2 million.

Even as executives talked about Twitter’s bright future on the earnings calls, investors appeared to react to Twitter’s slowing user growth, as its monthly user count went south, falling by 1 million to 355 million, as compared with the year’s first quarter.

Earlier: Twitter to purge millions of suspended accounts, but CFO says active-user numbers won’t change

The decline was expected after recent reports had the company purging about a million fake accounts a day. At the time, Twitter Chief Financial Officer Ned Segal sought to minimize the issue.

But, on the earnings call with analysts, Segal said the decline in monthly active users of about 3 million was because of the company’s effort to clean up its platform, as well as a decision not to renew text-messaging contracts — Twitter, as a legacy of its earliest days, can be delivered via SMS instead of on the web — as well as the European Union’s General Data Protection Regulation, which went into effect during the quarter.

Twitter’s “health initiatives” — the company’s jargon for its attempt to render the platform free of hate speech, fake accounts and election meddling by foreign powers — would be an ongoing cost for the social network to bear, according to Chief Executive Jack Dorsey.

Should antitrust laws be enforced against the tech giants' monopolies?

“[Health] is one of those things like security or privacy,” Dorsey said on the earnings call, “where companies have to evolve and companies have to stay 10 steps ahead as you learn the dynamics of the network and get better and better. We have made some meaningful progress … but there’s still a lot ahead.”

Despite the market’s decidedly negative reaction to the monthly user numbers, some analysts say that selling shares after active-user declines is not the best investor idea.

In a 2017 blog post that he mentioned again Friday on Twitter, BTIG analyst Greenfield argued that the active daily user count is a more reliable predictor of the San Francisco–based company’s potential revenue. Twitter stopped reporting the precise daily user number — Greenfield acknowledged that he does not understand why executives refuse to disclose the metric — but said daily user growth is the hallmark for people returning to the platform and engaging.

The one daily data point Twitter does provide: the daily active user growth rate percentage. In the second quarter it was 11%, compared with 12% in the year-earlier quarter.

Don’t miss:Did Twitter win the World Cup?

The World Cup added $30 million to the company’s top line, a significant source of revenue and well above the $24 million it banked from 2014 World Cup. Segal said on the earnings call with analysts that the World Cup bridged the second and third quarters, though the company saw more revenue in the first two weeks of the event than the second two weeks.

“We were able to showcase our events and topics infrastructure and also on delivering for advertisers,” Segal said. “But all that $30 million is incremental. You could imagine some of it would be ads that would be showing on Twitter anyways in an environment where we’re increasingly always-on for advertisers, and some of it would be incremental as we have more the conversation around the World Cup on Twitter than might be happening elsewhere.”

Japan proved another high point, and the company said it remains the second largest market for Twitter, with second-quarter revenue of $122 million, a 65% gain over the year-earlier quarter. Segal said that, as with many of the company’s international efforts, Japan has taught the company lessons that it has rolled out across the world: its bookmarking feature, as well as upping the character limit from 140 characters to 280 characters.

“I think our success recently has to do with both sides of the ledger, where we work hard on audience in engagement and listened but also where we have executed well on the [advertising] agency side.” Segal said. “And there’s a more concentrated market, and we’re started to see that bear fruit.”