U.S. manufacturers were busy in April as factories ramped up production to rebuild inventories though soft labor markets still point to a relatively slow economic recovery.

Data on Thursday indicated manufacturing may continue leading growth for a while. Analysts said recovery should then shift from government stimulus and stockpiling to consumers once hiring picks up in the factory sector.

With the manufacturing sector accelerating, it's likely the overall economy will continue to grow at an above trend growth for the time being, said Zach Pandl, an economist at Nomura Securities International in New York. The handoff from fiscal policy to underlying domestic growth should happen at some point this year.

Expansion in manufacturing was highlighted by the New York Federal Reserve's Empire State general business conditions index which rose to a six-month high of 31.86 in April from 22.86 last month. Markets had expected a reading of 24.

Separately, the Philadelphia Federal Reserve Bank's business activity index rose to the highest level in four months during April. The rise in the index to 20.2 from 18.9 the prior month was a touch above market expectations.

A report from the Federal Reserve showed overall industrial production rose only 0.1 percent in March as heating needs fell, manufacturing output increased 0.9 percent led by widespread gains among durable goods industries.

The strong manufacturing data prompted Goldman Sachs to raise its forecast for second quarter gross domestic product growth to an annual rate of 3 percent from a 2 percent pace.

Although our 2.5 percent estimate for annualized first-quarter real GDP growth still looks right, the U.S. economy appears to be headed for stronger growth in the second quarter, said Edward McKelvey, an economist with the bank.

But there was still plenty of slack in the labor market. Initial claims for state unemployment benefits rose 24,000 to a seasonally adjusted 484,000 last week. A Labor Department official attributed the spike to a backlog in applications from the Easter holiday and saw no unusual economic factors.

U.S. stocks posted their sixth straight day of gains as an upbeat profit forecast from United Parcel Service pushed up transportation shares and offset concerns about the rise in jobless claims. U.S. Treasury debt prices rose, while the U.S. dollar was up versus the euro and yen.

MANUFACTURING ROBUST

Clearly the factory sector is enjoying a robust turnaround, driven by inventory rebuilding at home and strong final demand abroad, said Paul Ashworth, senior U.S. economist at Capital Economics in Toronto.

In a sign of strengthening demand overseas, China recorded surprisingly strong annual growth of 11.9 percent in the first quarter. The rate of expansion was the fastest since 2007.

Although applications for jobless benefits surged last week, they were unlikely to derail the nascent jobs recovery, analysts said. Signs of the improving labor market tone were also evident in the New York Fed survey, where the employment index jumped to a four-year high in April.

Labor market sluggishness has raised doubts about the durability of the economy's recovery from its worst downturn in 70 years. Firming domestic demand is reducing some of the skepticism, however.

We are going to see improvement in jobs even though we saw a jump in jobless claims earlier today. Other indicators show the labor market is improving, said Nigel Gault, chief U.S. economist at IHS Global Insight in Lexington, Massachusetts.

President Obama's popularity has taken a hit along with that of fellow Democrats given growing public impatience over slow economic recovery and high unemployment. This is threatening the Democratic Party's prospects in the November congressional elections.

Retail sales surged in March, government data showed on Wednesday, and businesses have started rebuilding inventories.

Atlanta Federal Reserve Bank President Dennis Lockhart said on Thursday while the economy was doing much better, it still needs the strong medicine of low interest rates to deal with problems in housing an commercial real estate.

Resource usage, one of the factors being watched by the U.S. central bank to determine when to lift interest rates from near zero, edged up in March. Capacity utilization edged up to 73.2 percent from 73.0. It was still 7.4 percentage points below the 1972-2009 average.

Labor market woes continue to cause problems as a growing number of homeowners struggle to pay mortgages.

U.S. home foreclosures jumped 19 percent to a monthly record in March, driving first-quarter actions up 7 percent from the prior quarter, RealtyTrac said late on Thursday.

But there was a ray of hope for the troubled housing market. Home-builder sentiment rose to a seven-month high this month as consumers rushed to take advantage of the home buyer tax credit. An improving economic picture also helped to lift confidence.

(Writing by Lucia Mutikani; Additional reporting by Emily Kaiser in Washington, John Parry, Wanfeng Zhou and Richard Leong in New York; Editing by Andrew Hay)