NEW YORK, April 27 (Reuters) - U.S. Steel Corp (X.N) posted a smaller-than-expected quarterly loss on Tuesday as sales rose, and the company said it anticipated some profitability in the second quarter.

Although it was the steelmaker’s fifth consecutive quarterly loss, the company said there were signs of economic recovery and it was increasing production capacity that had been severely reduced when the recession hit demand for steel.

“We anticipate being profitable in all three of our operating segments in the second quarter,” Chief Executive Officer John Surma said in a statement. “Gradually improving business conditions should be reflected in our operating results, most notably for our flat-rolled segment.”

Wall Street analysts were pleasantly surprised by the results, although U.S. Steel’s stock fell about 6 percent to $56.55 in late afternoon trading on the New York Stock Exchange on a day when the broader market was down.

Analyst Leo Larkin of S&P Equity Research raised U.S. Steel’s investment rating to “buy” from “sell” and increased its 2011 earnings estimate and share price target to $70 from $56 “on a more optimistic outlook for prices and margins.”

“It was a really bang-up quarter,” said analyst Michelle Applebaum of Steel Market Intelligence. “It was a far better quarter operationally than we could have hoped for.”

As a result of the company’s expectation of operating profit in each business segment in the second quarter, she raised her estimate from a loss of 20 cents per share to a profit of 15 cents per share.

Analyst Charles Bradford, of Affiliated Research Group, said the company’s second-quarter outlook “will require people to raise their estimates to a much more meaningful profit.”

Later, on a conference call with Wall Street analysts, Surma said the outlook might be affected by raw material costs, particularly iron ore prices, which are expected to rise significantly.

“There’s some uncertainty in the market around what the real raw materials cost are and how they are going to be felt.

“For some producers, including us, we haven’t felt the full brunt of that yet,” Surma said of iron ore price increases expected to be more than 50 percent.

Asked how high iron ore prices might go, the U.S. Steel chief declined to be specific. “It would be in the context of the kind of increases that you all are talking about. So it’s not, you know, a small percentage. It’s 50, 60, 70 (percent) ... depending on buying, whether it’s pellets, whatever.

U.S. Steel’s first-quarter net loss narrowed to $157 million, or $1.10 per share, from $439 million, or $3.78 per share, a year earlier, the Pittsburgh-based company said. Sales rose to $3.9 billion from $2.8 billion.

Analysts on average expected a loss of $1.35 per share and sales of $3.75 billion, according to Thomson Reuters I/B/E/S.

U.S. Steel said first-quarter steel shipments were 5.4 million tons, a 69 percent jump from a year earlier and up 16 percent from the fourth quarter. Average realized prices increased by $21 to $654 per ton over the fourth quarter.

“We remain cautiously optimistic in our outlook for end user demand for all three of our operating segments, in line with a gradual and continuing economic recovery,” Surma said.

U.S. Steel said its flat-rolled raw steel capability utilization rate increased to 73 percent in the first quarter, from 64 percent in the fourth. It also completed maintenance work on its No. 14 Blast Furnace at Gary, Indiana, in mid-March and had all steelmaking capacity in operation, with the exception of the Lake Erie Works in Canada.

The company said United Steelworkers-represented employees at Lake Erie Works had ratified a new three-year labor agreement, and it expects to restart steel finishing, cokemaking and steelmaking facilities there in a staged process throughout the second quarter.