The nation's manufacturing sector expanded in December to the market's surprise, reversing a contraction a month earlier.

The Institute for Supply Management said Wednesday its manufacturing index registered 51.4 in December, compared with 49.5 in November, which was the first time the sector's activity shrank since April 2003. A reading below 50 indicates contraction, while a reading above 50 signals expansion.

Click here to visit FOXBusiness.com's Economy Center.

December's index came in above the average analyst expectation for a reading of 50, or no change in the sector's output.

The manufacturing sector had grown for 41 consecutive months prior to November, but falling home prices, high energy prices and other factors conspired to reduce industrial activity that month.

Norbert J. Ore, chair of the ISM, said the sector proved "resilient" in December because of an increase in new orders and a decrease in inflationary pressure that brought down prices.

The ISM report said that employment in the manufacturing sector fell in December but at a slower rate, with a 49.7 reading compared with 49.2 in November.

The new orders index rose substantially to 52.1, compared with 48.7 in November. The production index increased to 51.8, compared with 48.5 in November.

Stock prices rose in morning trading. The Dow Jones industrials gained 65.21 to 12,528.36, while the Nasdaq composite index advanced 19.69 to 2,434.98. The broader Standard & Poor's 500 index rose 4.91 to 1,423.21.

Click here to visit FOXBusiness.com's Economy Center.