Insurer American International Group Inc reported a fourth-quarter loss of $4 billion on Thursday on the sale of its aircraft leasing business, ILFC, though its underlying results beat Wall Street expectations.

U.S.-based AIG posted a net loss of $4 billion, or $2.68 per share, compared with a year-earlier profit of $21.5 billion, or $11.31 per share.

On an operating basis, the company earned $290 million, or 20 cents per share. The company recorded after-tax losses of $1.3 billion in the quarter from Superstorm Sandy.

Analysts polled by Thomson Reuters I/B/E/S on average expected a loss of 8 cents per share in the quarter.

AIG shares rose 2.5 percent in after-hours trading.

(Reporting By Ben Berkowitz; Editing by Andre Grenon and Leslie Gevirtz)