(Matt Rourke/AP)

Twitter said Thursday that it might achieve profitability next quarter, a first for the company, which has struggled to attract new users and build a large, reliable base of paying advertisers.

In an earnings call, the company said its profitability has benefited from its growing audience, enhanced engagement and better cost controls. The earnings report was for the quarter that ended Sept. 30.

“What really matters is they are making progress toward revenue growth and profitability,” Pivotal Research analyst Brian Weiser said.

Twitter now counts 330 million monthly active users, up from 317 million at the same time last year. But the company disclosed on Thursday that it had overstated its number of monthly active users for a few years. Twitter reported that somewhere between 1 million and 2 million users of third-party apps per quarter had been incorrectly included in its numbers since late 2014. The monthly active users figure has been corrected, the company said, and is reflected in Thursday's report.

The number of daily active users, which the company said offers a more detailed look at how people use the site, was not affected by the misreporting. Twitter does not share the number of daily active users, but it said it has grown by 14 percent.

The company attributed part of the growth to its product improvements to “make Twitter easier” and more relevant.

Still, revenue for the company is down year over year. Twitter said it took in $590 million in revenue during the past three months, a decline of 4 percent compared with the same period last year. But the company says its international business is growing, along with audience and engagement. International revenue was up by 6 percent year over year, at $258 million, and total ad engagement doubled, the company said, attributing the spike in part to successful video ads.

Michael Pachter, an analyst for Wedbush Securities, said it's hard to measure how big of an impact user engagement has on driving additional advertising because Twitter does not disclose how frequently users visit the platform and how long they use it. Since Twitter reported growth in the number of daily active users, however, Pachter said the company is headed in the right direction and that it's banking on boosted user engagement to lead to more advertising and a more convincing case to keep advertisers paying.

Pivotal Research's Weiser pointed to Twitter's increasingly successful data licensing business, greater spending by its largest advertisers, and growth in international markets, particularity Japan, as positive trends. Twitter generated $91 million in revenue in Japan, up 23 percent compared with last year.

Twitter's latest earnings report comes as the company prepares to head to Capitol Hill next week to discuss Russian interference in the 2016 U.S. presidential election. Twitter general counsel Sean Edgett will testify Nov. 1 in back-to-back hearings of the Senate and House intelligence committees as lawmakers examine the role social media companies played in a Russian disinformation campaign. The top lawyers at Facebook and Google will also testify.

Twitter's stock closed up 18.49 percent to $20.31 a share on Thursday.