A surge in demand for aircraft pushed new orders for long-lasting U.S. manufactured goods up at their fastest pace in two years in July, the government said on Wednesday, hinting a modest economic recovery was taking shape.

Durable goods orders jumped 4.9 percent, the largest advance since July 2007, after falling 1.3 percent in June, the Commerce Department said. That was well above markets expectations for a 3 percent increase.

However, compared to the same period last year, new orders were still down 25.8 percent. Major U.S. stock indexes opened lower on Wednesday, while government debt prices were mostly flat.

On the surface, it looks good, but if you look a little closer, that just underscores the continued headwinds that face the U.S. economy, said Joe Manimbo, currency trader at Travelex Global Business Payments in Washington.

Orders in July were boosted by a surge in civilian aircraft orders at Boeing, while the reopening of Chrysler and General Motors assembly plants after emerging from bankruptcy raised automobiles output and led to an increase in orders for motor vehicles.

New orders for transportation equipment jumped 18.4 percent, the biggest increase since September 2006, while capital goods orders rose 9.5 percent in July --- the largest gain since December 2007.

Still, new orders excluding transportation climbed 0.8 percent in July, rising for a third straight month, after a 2.5 percent increase in June. It was the first successive three-month advance since the first quarter of 2006.

Even more encouraging for the economy, which slipped into recession in December 2007, shipments increased 2 percent after rising 0.7 percent in June.

Analysts reckon the worst slump since the Great Depression of the 1930s has probably ended or is close to ending, but see recovery being hobbled by sluggish consumer demand owing to high unemployment.

A second reading of second-quarter gross domestic product estimates due for release on Thursday could shed more light on the health of the U.S. consumer.

The vast majority of GDP is personal consumption and that has been the one that has been down now for five months in a row and people are worried about. So while this (durable goods report) is positive news, the important news is yet to come, said Peter Jankovskis, co-chief investment officer at Oakbrook Investments in Lisle, Illinois.

Non-defense capital goods orders excluding aircraft, a closely watched proxy for business spending, slipped 0.3 percent in July, the Commerce Department said.

Analysts polled by Reuters had expected core capital goods to increase 1 percent. The prior month was revised to show a 3.6 percent rise, previously reported as a 2.6 percent increase.

Durable goods orders are a leading indicator of activity in manufacturing, which in turn provides a good barometer for overall business health.

Durable goods inventories fell 0.8 percent in July, after declining 1.5 percent the prior month..

MORE MORTGAGE APPLICATIONS

U.S. mortgage applications rose for a second straight week, with demand for home refinancing loans rising to its highest level since early June, data from an industry group showed on Wednesday.

Applications for loans to buy a home, an early indicator of sales, rose slightly last week, but nevertheless gained for a fourth consecutive week. The trend bodes well for the hard-hit U.S. housing market, which has been showing signs of stabilization.

(Reporting by Lucia Mutikani; Editing by Neil Stempleman)