Twitter Inc on Thursday delivered its first quarterly profit and an unexpected return to revenue growth helped by expansion outside the US, pushing shares in the social network to more than two-year highs.

Overall revenue rose two per cent in the fourth quarter from a year earlier, handily beating analyst estimates that called for a fourth straight quarter of declines.

Twitter’s previous inability to turn a profit or log consistent revenue growth had confounded investors given its ubiquitous media presence and popularity among celebrities, athletes and politicians such as US President Donald Trump.

Revenue from outside the US rose 17 per cent, making up for an eight per cent decline in US sales. Revenue from Japan rose 34 per cent to $106 million, and chief financial officer Ned Segal said Chinese exporters were strong advertisers abroad.

Shares closed 12.1 per cent higher at $30.18 after hitting a high of $35.00. Twitter was founded in 2006 and went public in 2013 at $26 a share.

Twitter, which has doubled the number of characters allowed per tweet and made other changes to attract users, said the number of daily active users rose 12 per cent.

“Advertisers want eyeballs, so anything Twitter can do to maximise the number of people accessing the platform daily for a good chunk of time allows for better ROI,” or return on investment, analyst Erna Alfred Liousas of Forrester Research said.

Monthly active users grew more slowly, up four per cent from a year earlier to 330 million. That was flat from the third quarter, which the company blamed in part on seasonal weakness and its purge of fake and spam accounts.

Twitter said revenue was helped by using data to make the targeting of ads more individualised, a process known as machine learning. That raised click-through rates, or the ratio of users who click on a specific ad to the number that view it. The company also cited higher video ad sales and redesigned ad formats as helping to grow revenue.

“They are showing the right tweets to the right people at the right time, and as you do that, not only do you drive consumers to use Twitter more, but you attract more and more advertisers to want to be on the platform,” analyst Richard Greenfield of BTIG Research said.

Overall revenue was $731.6 million, beating Wall Street’s target of $686.1 million, according to Thomson Reuters.

The company reported $87 million in data licensing and other non-advertising revenue, up 10 per cent from a year earlier. Ad revenue rose one per cent to $644 million.

Twitter reported a net profit of $91.1 million, or 12 cents per share, compared to a loss of $167.1 million, or 23 cents per share, a year earlier.

Adjusted profit was 19 cents per share, topping analyst expectations of 14 cents per share.

The company said it expects to be “GAAP profitable for the full year 2018,” referring to generally accepted accounting principles.

But analysts were split on what lies ahead for the company.

Twitter needs to attract more new users and is trading at a “lofty premium” given expected earnings, James Cakmak of Monness, Crespi, Hardt & Co said in a client note.

Greenfield said he expected growth for years to come. “This is all about really looking at the potential of revenue growth as they scale and leverage their cost structure,” he said.

Chief executive Jack Dorsey focused for the past year on tweaking the product he co-founded to attract users, including by trying to limituser harassment. 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. Shares in Twitter had already surged 47 per cent over the past 12 months as of Wednesday’s close, outpacing a 17 per cent rise in the S&P index.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.