Shares of United States Steel Corp. (X) - Get Report rose in after-hours trading Thursday after the company posted a narrower-than-expected loss thanks to cost-cutting and better than expected rolled steel sales.

The stock gained 80 cents, or 7%, to $12.30 in after-hours trading. Shares had fallen 4.2% during the regular session.

The company posted an adjusted net loss of $35 million, or 21 cents a share. Analysts surveyed by FactSet had been expecting the company to lose $44.9 million, or 25 cents a share, in the wake of a pre-announcement earlier this month.

The company posted sales of $3.1 billion, vs. estimates of $3 billion.

"The team delivered better than expected results from solid cost performance and higher than forecasted shipments in Flat-Rolled," said President and Chief Executive Officer David B. Burritt in a statement.

Save 57% during our Halloween Sale. Don't let this market haunt you. Join Jim Cramer's Investment Club, Action Alerts PLUS. Click here to sign up!