Output at U.S. manufacturers rose in February for a sixth consecutive month, underscoring a sustained rebound in the industry.

The 0.5% gain at factories, which make up 75% of overall industrial output, matched the prior month’s advance, marking the best back-to-back performance in three years, a Federal Reserve report showed Friday. Total industrial production, which includes mines and utilities, was unchanged as warm weather reduced demand for heating.

More appropriate levels of inventories, a recovery in global markets and stronger corporate spending on equipment have put manufacturers on firmer footing. The data support other figures showing an improving outlook for the nation’s factories.

The increase in manufacturing last month matched the median forecast in a Bloomberg survey. Economists’ estimates ranged from a decline of 0.1% to an advance of 0.8%. The prior month was revised up from an initially reported 0.2% increase. Factory output accounts for about 12% of the economy.

For total industrial production, the Bloomberg survey median called for a 0.2% advance, with estimates ranging from a 0.2% decline to a 0.6% increase. The prior month was revised to a 0.1% drop from a previously reported 0.3% decline.

Capacity utilization, which measures the amount of a plant that is in use, eased to 75.4% from 75.5% in the prior month, the Fed report showed. Capacity at factories rose to 75.6%, the highest since October 2015.

Utility output dropped 5.7% after a 5.8% decrease the previous month. Last month was the second-warmest February on record, according to the National Oceanic and Atmospheric Administration.

Mining production, which includes oil drilling, increased 2.7%, reflecting another solid gain in oil and gas well drilling. The Fed’s figures showed well drilling is up 31% over the past year. U.S. rig counts climbed to 768 in the week ended March 10, the highest since late 2015, Baker Hughes Inc. data show.

Manufacturing output in February was led by fabricated metals, machinery and plastics, paper and rubber production.

Output of business equipment climbed 0.7% last month after a 0.1% drop in January, while production of construction supplies jumped another 1.3% following a 1.4% surge.

Consumer goods production, meanwhile, dropped 0.4% in February.

The output of motor vehicles and parts rebounded 0.8% after a 0.8% decrease the previous month. Excluding autos and parts, production at manufacturers rose 0.4% after a 0.6% advance.

By Shobhana Chandra