Twitter Inc reported its first quarterly net profit and topped Wall Street targets on Thursday as video ad sales rose, while a clampdown on fake accounts brought the number of people using the social network in below expectations.
Shares of the microblogging service rose about 25 per cent in pre-market trading after an initial dip.
Twitter's previous inability to turn a profit had confounded investors given the company's ubiquitous presence in the media and popularity among celebrities, athletes and politicians such as US President Donald Trump.
Twitter in October had signaled the breakthrough was possible as it slashed expenses. Fourth-quarter adjusted profit and revenue both topped analysts' targets.
The company said it expects "to be GAAP profitable for the full year 2018," referring to generally accepted accounting principles.
Still, Twitter missed Wall Street targets for people using the service, reporting 330 million monthly active users for the quarter, a 4 per cent increase from a year earlier but flat from the third quarter.
Analysts on average had expected 332.5 million monthly active users, according to financial data and analytics firm FactSet.
The tally of users is closely watched by investors as a sign of future ad sales potential.
San Francisco-based Twitter said usage was hurt by seasonal weakness and a change that Apple Inc made to its Safari web browser that reduced the tally of users by 2 million. Twitter had warned investors about the two factors in October.
Twitter also said in a shareholder letter that it had stepped up efforts to reduce spam, automated accounts known as "bots" and fake accounts.
Monthly active users in the US market, where Twitter makes most of its revenue, fell to 68 million from 69 million in the third quarter.
Chief Executive Jack Dorsey has focused for the past year on tweaking the product he co-founded to try to attract more people.
Dorsey doubled the number of characters allowed in each tweet in most languages, from 140 to 280, and tried to limit the harassment of women and minorities on the site. Twitter has also struck deals with media companies for live news and entertainment shows.
Facebook Inc has 2.1 billion monthly users, while Snapchat owner Snap Inc, which does not report a monthly figure, has 187 million daily users.
Twitter swung to a net profit of $91.1 million, or 12 cents per share, in the fourth quarter, from a loss of $167.1 million, or 23 cents per share, a year earlier.
Adjusted profit was 19 cents per share, topping analysts expectations of 14 cents per share, according to Thomson Reuters I/B/E/S.
Revenue rose 2 per cent year-over-year to $731.6 million, the first increase since the fourth quarter of 2016, beating Wall Street's target of $686.1 million, according to Thomson Reuters I/B/E/S.
Twitter continued a push to diversify its sales beyond advertising.
It reported $87 million from data licensing and other revenue, up 10 per cent from a year earlier, while advertising revenue rose 1 per cent to $644 million.
Shares in Twitter were up 47 per cent over the past 12 months as of Wednesday's close, outpacing a 17 per cent rise in the S&P 500 Index.
The social media sector is trying to cope with a regulatory backlash in Europe and the United States over privacy, addiction to the medium, hate speech and alleged abuse of social media by Russia to sway foreign elections.
Twitter in January said it had expanded notifications to about 1.4 million people exposed to content generated by a suspected Russian propaganda service during the 2016 US elections. Moscow denies meddling.