Factory activity accelerated rapidly in the U.S. Mid-Atlantic region in December, a survey showed on Thursday, hitting its highest in 4-1/2 years and assuaging some worries the industrial recovery is slowing.

Confounding market forecasts for growth to slow slightly, the Philadelphia Federal Reserve Bank said its business activity index rose to 20.4 from 16.7 in November.

Analysts polled by Reuters had expected a reading of 16.0. Their forecasts ranged from 6.9 to 20.0. Any reading above zero indicates growth in the region's manufacturing sector.

This will mitigate concerns that the factory sector might be slowing, said Tony Crescenzi, market strategist and portfolio manager at PIMCO in Newport Beach, California.

U.S. stocks initially trimmed their losses after the Philly Fed data. Government bonds, which perform better during times of economic weakness, trimmed their gains.

The survey covers factories in a region encompassing eastern Pennsylvania, southern New Jersey and Delaware and is looked at closely as one of the first indicators of the health of the U.S. manufacturing sector.

It is likely to offset some worries that national factory activity is slowing after a barometer of manufacturing in New York State, the Empire State index, unexpectedly plummeted in December, according to a report released on Tuesday.

(Reporting by Burton Frierson and John Parry; Editing by Theodore d'Afflisio)