Facebook's profit and revenue for the final quarter of the year handily surpassed Wall Street's expectations, despite challenges the social network is facing around regulation and efforts to fight election interference.

Facebook earned $7.35 billion, or $2.56 per share, up 7% percent from $6.88 billion, or $2.38 per share, a year earlier.

The company said Wednesday that is revenue rose 25% to $21.1 billion from $16.9 billion.

Analysts were expecting earnings of $2.52 per share and revenue of $20.9 billion, according to FactSet.

Facebook's stock dropped more than 6% in after-hours trading after the results came out, even though the numbers were better than expected.

The Menlo Park, California-based company had 2.5 billion monthly users at the end of the year, up 8% from a year earlier.

The company has had a rough couple of years and is under growing regulatory scrutiny around the world. In the U.S., it faces several government investigations for alleged anti-competitive behavior. Last August, it was fined $5 billion by the Federal Trade Commission for privacy violations. This was the largest FTC fine ever for a tech company.

"This is a company that has shown that it can withstand ongoing criticism of its practices and yet still pull out gains in both revenue and users," said eMarketer analyst Debra Aho Williamson.