The San Francisco-based messaging service said it earned $91 million in the fourth quarter, the first positive net income since going public in 2013.
Revenue was up two percent from a year ago to a better-than-expected $732 million, while the number of monthly active users rose modestly to 330 million.
Twitter shares surged 22 percent to $32.94 in pre-market trade on the news. The shares this month jumped above the 2013 offering price of $26 for the first time since late 2015.
The profitability marks a milestone for Twitter, which has lost money consistently since its public offering, sparking speculation on whether it needed to sell itself to keep operating.
Chief executive Jack Dorsey welcomed “a strong finish to the year,” and added “I’m proud of the steady progress we made in 2017, and confident in our path ahead.”
While Twitter has built a solid core base of celebrities, politicians and journalists, it has failed to achieve the broader appeal of Facebook and other social platforms, hurting its ability to bring in ad revenues.
But the network has stepped up efforts to boost its user base and engagement, adding streaming video partnerships, doubling the character limit on tweets to 280 and making it easier to create “tweetstorms” by stringing messaging together.
Earlier this month, BTIG Research analyst Richard Greenfield raised his outlook for Twitter, saying that “management has refocused the company on its core product (and) pushed their product team to iterate far faster than ever before in the company’s history.”
Greenfield said Twitter’s use of artificial intelligence “made the Twitter user experience more compelling by showing consumers the tweets they care most.”
Twitter’s monthly user base of 330 million is far behind the two billion of Facebook, but Twitter said its daily active user base — for which it has not offered a specific number — grew in double digits.
Both Twitter and Facebook have stepped up efforts to crack down on “bots” and other efforts to manipulate their platforms to deflect criticism from lawmakers and others concerned about the spread of disinformation.
“We are committed to making Twitter safer, and we are clarifying our policies, improving our enforcement, and communicating more clearly,” the company said in a tweet.