Facebook is quickly closing in on the two billion user mark.

The social network had 1.86 billion monthly active users as of the end of 2016, up from 1.79 billion the previous quarter and 1.59 billion a year earlier, according to its fourth quarter earnings report on Wednesday.

In fact, Facebook added more users this quarter compared to a year earlier than any quarter since the company went public in 2012, according to CFO David Wehner.

Wehner attributed the impressive user growth to "promotional data plans" from third parties in countries like India as well as Internet.org, Facebook's free stripped-down Internet offering in developing markets.

Facebook's (FB) ability to keep growing its community while also creating more advertising products continues to help the company beat Wall Street expectations for sales growth.

Facebook's sales for the December quarter totaled $8.8 billion, up more than 50% from the same period a year earlier. The company's overall sales for 2016 also grew by about 50% to $27.6 billion.

Facebook generated nearly $20 from each user in the U.S. and Canada during the quarter, up from $13.70 a year earlier as it offers more lucrative video ads.

The company's stock rose as much as 2.5% in after hours trading Wednesday following the earnings release.

"Our business did well in 2016, but we have a lot of work ahead to help bring people together," Mark Zuckerberg, Facebook's CEO and cofounder, said in a statement.

Related: Sheryl Sandberg criticizes Trump rule on abortion

Facebook's spooked investors last quarter by talking up plans for "aggressive investment" in 2017 even as sales growth is expected to slow. He reiterated that point on a conference call with analysts Wednesday.

The reason: Facebook has nearly saturated the number of ads it can put in front of users.

Despite that warning, Facebook's sales have continued to grow at a faster clip than investors expected.

Facebook's stock, like much of the tech industry, took a hit when Donald Trump won the election.

As a candidate, Trump called out Zuckerberg for his immigration policies. He has also threatened to crack down on the hiring of foreign workers, which is a key source of talent for Silicon Valley.

Facebook's top two execs both came out against Trump's travel ban, after staying mostly silent during the first days of the new administration.

"Like many of you, I'm concerned about the impact of the recent executive orders signed by President Trump," Zuckerberg wrote in a Facebook post. COO Sheryl Sandberg called it "particularly unforgiving" for women.