Video subscription service Netflix Inc reported a quarterly profit as the company added subscribers in the United States and abroad, sending its shares 27 percent higher.

Netflix had warned Wall Street it expected a loss for the quarter.

The company reported on Wednesday $8 million in net income for the fourth quarter, or 13 cents per share. Revenue rose to $945 million.

Shares of the company surged 27 percent after Netflix released its results, reaching $131.60 in after-hours trading. Netflix earlier closed at $103.26 on Nasdaq.

Netflix said it added 2.1 million customers to its U.S. streaming business during the quarter for a total of 27.2 million.

"They did surprisingly well with subscriber growth and profitability," Lazard Capital Markets analyst Barton Crockett said. "It was a very good quarter."

Wall Street analysts on average had predicted Netflix would report a loss of 13 cents per share, according to Thomson Reuters I/B/E/S.

(Reporting by Lisa Richwine; Editing by Phil Berlowitz)