The numbers: The productivity of American workers fell in the third quarter for the first time in almost four years, reflecting a cutback in production as the U.S. economy slowed toward the end of summer.

Productivity declined at a 0.3% annual rate from July to September, the government said Wednesday. It fell a somewhat smaller 0.1% among American manufacturers.

Economists surveyed by MarketWatch had predicted a 0.6% increase in productivity.

The drop in productivity might be just temporary if the economy speeds up again, but it could also be a warning sign. Businesses reduced production in response to softer demand, especially for exports. The trade war between the U.S. and China has disrupted global supply chains and contributed to a world-wide slowdown in economic growth.

Read:U.S. manufacturers still suffering from China trade fight, tepid global economy

What happened: Companies increased the amount of goods and services they produced, known as output, by a solid 2.1%.

Yet the hours workers spent on the job rose an even faster 2.4%, the Bureau of Labor Statistics said Wednesday. Productivity is determined by the difference between output and hours worked.

Unit-labor costs, meanwhile, rose at a 3.6% annual rate. Over the past year these costs have climbed 3.1%, the highest year-over-year clip in more than five years.

All figures are seasonally adjusted.

Consumers keep U.S. economy plugging along, GDP shows

Big picture: Productivity had accelerated in the past several years as companies boosted investment, punctuated by large 2.8% and 3.6% gains in the first two quarters of 2019. Yet the trade war with China has thrown a wrench in corporate-spending plans. It could be a problem for the U.S. economy if the trade war persists.

Without more business investment, productivity might backslide. That’s not good for workers or businesses. Higher productivity is the key to a rising standard of living, resulting in higher pay, more profits and low inflation.

Low productivity is a sign of an inefficient economy. Productivity in the U.S. has risen at an average rate of just 1.3% since 2007, compared with a 2.1% average since the end of World War II.

Read:Trade deficit falls to 5-month low as U.S. posts first oil surplus since at least 1978

What they are saying? “The rates of business investment in equipment, machinery, software, and research and development are the main drivers of productivity growth,’ said chief economist Richard Moody of Regions Financial. “This is why we are so concerned about the recent pullback in business investment.”

Market reaction: The Dow Jones Industrial Average DJIA, +1.33% and S&P 500 SPX, +1.59% were mixed in Wednesday trades. Both indexes have set fresh records in the past week on optimism on a breakthrough in U.S.-China trade talks.

Read:The economy is avoiding the worst potholes, but the U.S. isn’t ready to hit the gas