U.S. manufacturing was in a mild recession for all of 2019, according to data released Friday by the Federal Reserve.

In contrast with steady growth in the larger economy, U.S. factory production shrank by 1.3% in the past year, the Fed reported. It marked the worst year for manufacturing since 2015, as the trade war, lackluster global growth and problems at airplane maker Boeing hurt America's industrial economy.

A technical recession occurs when output falls for six months, as it did from January to June last year. There were signs of a rebound after manufacturing production rose from July to September, but the latest data show that output fell back into negative territory in the fourth quarter.

Large U.S. manufacturers such as Caterpillar have blamed President Donald Trump's trade war for their slumping sales. The tariffs have hit the hardest on parts used to make cars, washing machines and other products, raising costs for U.S. manufacturing companies. A widely watched gauge of the health of the manufacturing sector — a survey of purchasing managers from the Institute for Supply Management — fell in December to its lowest level since the Great Recession. Global trade "remains the most significant cross-industry issue," the ISM report said.

"Manufacturing is in a slump. It's an export-sensitive sector and exports have been hammered," said Rubeela Farooqi, chief U.S. economist at High Frequency Economics. "The Phase One trade deal with China should provide a boost to the manufacturing sector, but right now, the overall trend is weak."

The downturn is a sore spot in an otherwise healthy U.S. economy and a potential political weakness for President Donald Trump, who promised to bring back blue-collar jobs.

Manufacturing has also been hurt by factors outside of the president's control. Oil prices have remained low, which has reduced investment in oil and gas exploration. Auto purchases have pulled back a little after years of record sales. A strong U.S. dollar has made American goods more expensive on world markets. And much of the global economy weakened in 2019, leading foreign companies to purchase less American-made machinery and parts.

Another big issue was Boeing, one of the largest manufacturers in the country. The aerospace titan, fresh off a record 806 deliveries of planes in 2018, delivered just 380 last year as its flagship 737 Max aircraft spent much of the year grounded, marred by fatal crashes and ever-escalating controversy.

Boeing's drag on U.S. output will only increase — the company announced it would pause production of the aircraft this year — and that has already rippled throughout the sector. Last week, one of its largest suppliers, Spirit AeroSystems in Wichita, Kan., announced plans to lay off 2,800 employees amid "ongoing uncertainty" around the Boeing planes.

Despite manufacturing's challenges, the overall economy grew last year, powered by American consumer spending. Economists say manufacturing is no longer the harbinger it once was for overall economic health because the sector accounts for just a little over 10% of the economy. But the sector plays an outsized role in the economies of several politically important swing states, including Wisconsin, Michigan and Pennsylvania, which have all shed manufacturing jobs in the past year.

Trump has made manufacturing a centerpiece of his presidency. During his 2016 presidential campaign, he told a crowd of Pennsylvania supporters: "I consider myself, in a certain way, to be a blue-collar worker."

The president has frequently toured U.S. factories and promised to revive blue-collar jobs and manufacturing. He celebrated the surge in manufacturing jobs in 2018 when the sector added 264,000 workers, but hiring pulled back sharply in 2019 as manufacturing added only 46,000 jobs over the course of the year.

Hiring was especially weak in the second half of the year — after Trump announced additional tariffs on China in August. In a telling sign, manufacturing job openings rose through June and then declined by about a quarter through November, according to data released Friday by the Labor Department.

Some economists are hesitant to call this a manufacturing recession because indicators remain mixed. Many indexes that track the sector are down, but not nearly as much as what is typical during downturns. The ISM Index was 47.2 in December, Farooqi notes, which is well above the low 40s numbers that normally occur during recessions.

There's cautious optimism that manufacturing will rebound in 2020 as the global economy is expected to pick up with the pause in Trump's trade war. He signed a partial deal with China this week that halts further tariffs on China for now, and he is about to sign the U.S.-Mexico-Canada agreement that will keep many goods moving across the border tariff-free.

"There is some evidence that the latest manufacturing recession is over," said Alan Tonelson, founder of the RealityChek blog, which monitors manufacturing.

He pointed to the Fed data showing modest increases in manufacturing output for November and December. The small rebound was backed up by a rise in another manufacturing gauge known as the IHS Markit U.S. Manufacturing PMI. It showed the fourth quarter picking up after a weak spring and summer.

"Output rose a bit at the end of 2019. Manufacturers seem to be figuring out the new world of trade policy. They are making adjustments to their supply chains," Tonelson said.