Second-quarter earnings at U.S. Steel ( X) rose 62% from a year ago as the company feasted on surging demand and higher prices.

U.S. Steel earned $404 million, or $3.22 a share, in the quarter, up from $249 million, or $1.91 a share, a year ago. Analysts surveyed by Thomson First Call were expecting earnings of $2.38 a share in the most recent period. Sales were $4.11 billion in the second quarter, up from $3.58 billion a year earlier.

"Solid demand in our key end markets, outstanding operating performance, strong shipments and firming prices, particularly in spot markets, resulted in an excellent second quarter with earnings significantly higher than both the previous quarter and the same quarter last year," the company said.

"We operated at high rates of production capability in the U.S. and Europe, reflecting an outstanding performance by our people and the benefits of our recent capital programs."

U.S. Steel expects "strong operating results" in all three of its segments in the third quarter, with average realized prices in flat-rolled steel higher than in the second quarter and shipments little changed.

The stock rose $1.69, or 2.8%, to $61.55 in Tuesday's premarket.