WASHINGTON (Reuters) - Declining output of cars and machinery led U.S. factory production to fall unexpectedly in April, a sign the economy is losing a step as a trade war with China intensifies.

The Federal Reserve said on Wednesday manufacturing production fell 0.5 percent last month, the third decline in four months.

Economists polled by Reuters had forecast manufacturing output would edge up 0.1 percent during the month.

Motor vehicles and parts production dropped 2.6 percent in April. Inventories at U.S. businesses have swelled in recent months, with some trying to stock their shelves before new increases in tariffs on Chinese goods took hold. An inventory overhang in the automobile sector is weighing on production.

Even excluding motor vehicles and parts, manufacturing output dropped 0.3 percent in April. Factories produced fewer pieces of machinery and electrical equipment like appliances, according to the Fed report.

The outlook for the manufacturing sector, which accounts for about 12 percent of the economy, has also dimmed amid a global economic slowdown and as the stimulus from last year’s $1.5 trillion tax cut package diminishes.

Overall industrial output, which includes utilities and mining production, dropped 0.5 percent in April. While utilities output fell, mining production rose 1.6 percent.

Capacity utilization for the manufacturing sector, a measure of how fully firms are using their resources, slipped to 75.7 percent last month from 76.2 percent in March.

Overall industrial capacity utilization fell to 77.9 percent last month, which was 1.9 percentage point below its 1972-2018 average. Officials at the Fed tend to look at capacity use measures for signals of how much “slack” remains in the economy — how far growth has room to run before it becomes inflationary.