WASHINGTON (AP) -- Orders to U.S. factories fell in May, ending three months of gains.

The Commerce Department reports that orders fell 0.5%, pulled down by falling demand for military and transportation equipment. That followed increases of 0.8% in April, 1.5% in March and 1.7% in February.

Excluding military hardware, factory orders rose 0.2% in May from April. Orders for transportation equipment fell 2.9%.

Orders for durable goods, meant to last six months or more, fell 0.9% in May. Orders for nondurable goods slipped 0.2%.

Over the past year, factory orders were up 2.5%.

U.S. factories have been busy. The Institute for Supply Management reported Tuesday that manufacturing expanded in June for the 13th straight month, though the pace of growth slowed from May.