U.S. factory output fell last month as manufacturers cranked out fewer cars, computers and semiconductors, a sign that economic growth remains sluggish.

Factory production slipped 0.4 percent in May, after a big 1.1 percent gain the previous month, the Federal Reserve said Thursday. Manufacturing output has largely been flat since February, but is up 1.4 percent in the past year.

Overall industrial production, which includes mining and utilities, was unchanged in May. Mining activity posted a large gain for the second straight month, rising 1.6 percent. Much of that increase has been driven by greater oil and gas drilling. Utility production rose 0.4 percent.

U.S. manufacturing has shown some signs of life this year after almost no growth in 2015 and 2016. Businesses are investing more in industrial machinery and developers are building more homes, lifting output of construction supplies.

This Thursday, March 23, 2017, photo, shows spools of thread at Bally Ribbon Mills in Bally, Pa. On Thursday, June 15, 2017, the Federal Reserve reports on U.S. industrial production for May. (AP Photo/Matt Rourke)

Yet Americans are buying fewer cars, after sales reached record levels last year. They have now fallen for five straight months. Automakers responded by slicing output 2 percent in May.

General Motors said Wednesday that it would extend a summer shutdown in at least two Midwestern factories to five weeks from the traditional two weeks. Automakers typically close factories in the summer to prepare for the production of new models.

Still, other reports suggest that manufacturing remains healthy. The Institute for Supply Management, a trade group of purchasing managers, said last week that factory activity expanded at a slightly faster pace in May than April. New orders and hiring rose, the group said.

The economy is forecast to grow at a roughly 3 percent annual pace in the current April-June quarter, after tepid growth of just 1.2 percent in the first quarter. But that increase likely reflects a bounce back from the first quarter's weakness and isn't expected to be sustained. Growth for all of 2017 is forecast to come in at 2 percent.