The Federal Reserve said Tuesday that manufacturing production rose 0.3 percent in June from May. That followed a 0.2 percent gain the previous month. Still, the two consecutive gains barely offset production declines in March and April.
Overall industrial production, which includes factories, mines and utilities, also rose 0.3 percent in June. Mining output increased 0.8 percent, while utility output slid 0.1 percent.
Manufacturing is the most critical component of industrial production. The recent gains are a hopeful sign that factories could help the economy grow in the second half of the year.
The "report confirms the picture of a moderate recovery in the manufacturing sector," Annalisa Piazza, senior economist at Newedge Strategy, wrote in a research note.
Manufacturers have struggled this year, providing little support to the economy. Their output is up just 1.8 percent over the past 12 months. And factories have cut jobs in each of the past four months, shedding a total of 24,000 since February.
A key reason for the weakness is slower global growth has cut demand for U.S. exports. Europe is still in a recession and China's economy grew from April through June at the slowest pace in more than two decades.
Manufacturing has shown improvement in Britain, France and Italy. Large Japanese manufacturers are also sounding optimistic for the first time in nearly two years.
There have been other positive signs that suggest U.S. factory production could increase in the second half of the year.
The Institute for Supply Management said that factory activity improved in June after hitting its lowest level in four years. But the closely watched manufacturing survey reported that employment fell to its lowest level since September 2009.
Factory activity in the New York region grew for the second straight month in July, according to the Federal Reserve Bank of New York's Empire State manufacturing survey.
U.S. businesses reported a strong 1.1 percent increase in sales in May, the Commerce Department reported. Those same firms only increased their stockpiles slightly, suggesting they will need to order more goods to keep up with demand.
And Americans bought more cars and trucks, furniture and clothes in June, according to a separate Commerce report on retail spending. But consumers cut back almost everywhere else, and overall retail sales rose just 0.4 percent last month from May.