WASHINGTON — Orders to U.S. factories rose by a larger-than-expected amount in July as demand for commercial aircraft, heavy machinery and iron and steel all posted solid gains.

The Commerce Department reported Wednesday that new orders increased by 1.3 percent in July, much stronger than the 0.8 percent increase economists had been expecting. The July advance follows an even bigger 2.1 percent increase in June and represents the fifth straight rise in orders.

Manufacturers have seen a sharp slowdown in the U.S. economy offset by strong gains in foreign demand, helped by a weaker dollar which makes their products more competitive overseas.

The July strength was led by a 28.1 percent jump in commercial aircraft, which rebounded from a 21.3 percent decline in this volatile category in the previous month.

Orders in all transportation categories rose by 3.2 percent in July, the best showing in five months. It was the second straight month that orders for motor vehicles rose, increasing by 0.6 percent in July following an even bigger 3.2 percent June advance. The gains were viewed as temporary, however, given that automakers are struggling with a weak economy and plunging demand for once-popular models because of high fuel prices.

Excluding transportation, factory orders would have risen by 1 percent, slightly below the 1.5 percent economists had been expecting.

Orders for durable goods, items expected to last at least three years, rose 1.3 percent in July, unchanged from the preliminary estimate the government made last week. Orders for nondurable goods, products such as fuel, food and chemicals, increased 1.2 percent in July.

A number of categories showed big gains in the month, too.

Demand for iron and steel jumped by 5 percent, orders for machinery rose 4.1 percent with demand for construction machinery soaring by 17.9 percent.

Much of this strength reflects a boom in U.S. exports, the standout performer while the rest of the economy has been hit by the worst slump in housing in decades and a severe credit crunch.

But some economists have expressed worries about how long the export boom can last given spreading weakness in key overseas markets in Europe and Japan. Also, the dollar, which had been on a long slide, has come off its recent lows, which could translate into less of a price advantage for American products against foreign goods.

The government reported last week that the economy expanded at an annual rate of 3.3 percent in the April-June quarter, more than three times the growth rate turned in during the first three months of this year. The concern is that a slowdown in exports will dampen manufacturing activity and consumer spending will falter as the effect of $92 billion in economic stimulus payments begins to wear off, however.

A closely watched gauge of manufacturing activity was down slightly in August at 49.9, compared to a reading of 50.0 in July, according to a report Tuesday from the Institute for Supply Management. Readings above 50 are considered a signal that the manufacturing economy is expanding and readings below 50 are seen as a signal that manufacturing is contracting.