Facebook Inc. squeezed nearly 30% more revenue per user in the fourth quarter, pumping its advertising muscle ahead of an anticipated slowdown in growth later this year.

Users spent more time watching videos on Facebook and its photo-sharing app Instagram, providing the social media giant with more slots for ads. That built on growth in mobile advertising that Facebook has been taking advantage of for several years.

Each user generated $4.83 in revenue in the fourth quarter, jumping from $3.73 a year earlier, Facebook said Wednesday, helping send the company’s revenue up 51% to $8.81 billion.

Facebook’s shares were up 1% at $134.59 in after-hours trading on Nasdaq.

In 2016, Facebook added nearly 270 million users, bringing its monthly user base to 1.86 billion, the strongest increase in the number of users since Facebook went public in 2012. Most of the growth in users came from outside the U.S., such as in the Asia-Pacific region. However, the U.S. and Canada were the source of its increase in revenue.

ADVERTISEMENT

“In most mature markets, to see people come on the platform more often, that’s a very good trend,” said JMP Securities analyst Ron Josey. “And the mature markets are your most profitable.”

Facebook’s quarterly profit leapt to $3.57 billion from $1.56 billion a year earlier.

Facebook was at the center of political discourse during the fourth quarter, as voters, media organizations and presidential candidates flooded the site with posts. Yet political advertising stemming from the U.S. presidential election had a limited effect on Facebook’s business during the quarter, Chief Operating Officer Sheryl Sandberg said during a conference call. Political spending—even in the U.S.—didn’t crack the top 10 advertising categories for Facebook during the fourth quarter, she said.

“No one event is that big for our business,” she said. She also said Facebook was increasingly drawing revenue from a broader pool of advertisers.

The promotion of video across Facebook and its apps reflects what Chief Executive Mark Zuckerberg calls a “video-first” strategy. Mr. Zuckerberg has directed the company to weave video across all its products in recent months, an initiative resembling Facebook’s big push on mobile around its public offering in 2012.

“I see video as a mega trend on the same order as mobile,” Mr. Zuckerberg said Wednesday.

Nearly every product team at Facebook is working on video projects, including a video-centric app for set-top boxes. Facebook is promoting longer videos in its news feed, and late last year, it rolled out a video-only tab for U.S. users.

Facebook is also paying creators directly to make videos for Facebook and eventually plans to share revenue with publishers more broadly in the future. Mr. Zuckerberg hopes the tab will encourage users to turn to Facebook not only for news and updates from friends, but also entertainment.

Today, Facebook’s users open the app “when they have a few minutes” and want to see what’s going on in the world, Mr. Zuckerberg said. “That’s very different from saying hey, I want to watch video content now. That’s what I think we’re going to unlock with this tab,” he said.

Facebook has also been developing virtual reality capabilities, which Mr. Zuckerberg has predicted will be the next major computing platform. However, its main VR unit, Oculus, barely registers in the parent company’s growth, and sales of its first headset, launched last year, have been lower than anticipated.

Separately, a court in Dallas on Wednesday found Oculus guilty of unfairly using the code of a videogame publisher, ZeniMax Media Inc., to build its headset. The court awarded ZeniMax $500 million.

The parade of strong growth—the fourth quarter was the fifth straight quarter of revenue increases of at least 50%—will slow this year, Facebook has cautioned. Executives on Wednesday reiterated warnings from November that it will stop jamming more ads into the news feed, and expects advertising revenue growth to drop “meaningfully” later this year.