U.S. factory orders rose for a third straight month in May as output of airplanes and other transportation equipment reached their highest levels in years.

Factory-goods orders increased by 2.9%, following a revised 0.7% advance in April, the U.S. Commerce Department said today.

Economists had forecast a 3% increase.

Capital-goods orders rose 14.3% in May. Defense capital-goods orders rose 13.7%, the biggest gain since last October. Non-defence capital goods orders, or business equipment meant to last 10 years or more, grew 14.3% in May, the largest increase in nearly five years.

However, Commerce reported non-defence capital goods orders excluding aircraft, an indicator for business investment demand, shrank 2.5% after a 1.7% increase in April.

Demand for transportation-related goods rose 21.2%, the biggest in nearly three years, after a 7.9% gain in April.

Non-defense aircraft and parts orders surged 165% in May, while defense aircraft and parts orders rose 16.9%.

Orders for motor vehicle bodies and parts were unchanged after growing 4.8% the previous month. Minus transportation orders, overall factory orders would have fallen 0.1%.

The report showed factory shipments were unchanged in May, while unfilled orders rose 1.9%, and factory inventories were unchanged.