SAN FRANCISCO — Facebook shares shot up 8% in after-hours trading after the giant social network said it earned 79 cents a share on revenue of $5.84 billion in the fourth quarter, easily topping Wall Street estimates.

Facebook was expected to report earnings of 68 cents a share, excluding certain expenses, up from 54 cents a year ago, according to S&P Capital IQ. Analysts expected revenue of $5.37 billion, up 39% from $3.85 billion a year ago, according to S&P Capital IQ.

It was also the first quarter in which Facebook posted more than $1 billion in quarterly net income.

“Clearly the numbers are just stellar in terms of revenue growth, profitability, all the metrics that really matter,” said Pivotal Research Group analyst Brian Wieser. “Facebook’s numbers affirm its co-dominance of the industry with Google. These paces of growth on such large bases of preexisting revenue just remind you what remarkable gains Facebook continues to make in the industry.”

Facebook is grabbing a larger share of a growing digital advertising market especially on mobile devices. Facebook will capture $9.86 billion in U.S. display ad revenue in 2016 for a 30.6% share of total spending in that market, says research firm eMarketer.

“The Internet is capturing more share of advertising and Facebook is capturing the lion’s share of that growth,” said Wedbush Securities analyst Michael Pachter.

Facebook said 1.59 billion people come to the social network at least once a month, up from 1.55 billion people in the third quarter. And, Facebook says, 1.04 billion use Facebook every day. For the first time, more than 90% of those users came to Facebook on mobile devices.

“This is a perfect compare and contrast to Twitter,” Pachter said of Facebook’s fourth-quarter performance versus recent developments for Twitter. “You have a social media network that is all about engagement and is all about making sure that advertisers are aware of what their reach is, are able to reach consumers who find their ads relevant and it’s a perfect symbiotic relationship.”

Facebook reported that expenses grew 21% from the same period a year ago to $3.28 billion amid heavy spending on long-term initiatives such as artificial intelligence, virtual reality and spreading the Internet to the developing world.

Facebook shares have slipped nearly 8% since the start of the year. They closed down 3% to $94.45 in regular trading Wednesday. Facebook reported earnings after the close of the market. Facebook’s market cap briefly rose above $300 billion before the market turmoil.

“2015 was a great year for Facebook. Our community continued to grow and our business is thriving,” Facebook CEO Mark Zuckerberg said in a statement. Zuckerberg this week returned from paternity leave.

Follow USA TODAY senior technology writer Jessica Guynn@jguynn