Growth in the construction sector unexpectedly gained pace in December, a survey of purchasing managers showed on Wednesday, providing a rare glimmer of hope that the economy can still avoid recession.

The Markit/CIPS construction PMI rose to 53.2 from 52.3 in November, confounding economists' expectations for a fall to 51.7.

The survey suggests that the sector should make a positive contribution to the economy in the final quarter of the year, helping avoid a possible slide back into contraction, said Markit economist Sarah Bingham.

House building, commercial construction and civil engineering all saw an improvement in activity, she said.

The data so far suggest that gross domestic product (GDP) probably stagnated in the final three months of the year, she said.

The relatively small construction sector is faring better than its bigger peer manufacturing, which closed 2011 with its worst quarter in more than two years although in December factory output was broadly steady.

Bingham said the services PMI data due on Thursday would allow for a more accurate estimate of GDP growth.

The Bank of England sees the economy stagnating until the middle of this year, and some policymakers have warned it may shrink in one or two quarters.

Bingham said the outlook for construction remained uncertain as confidence was still subdued.

Optimism continues to be hindered by concerns regarding low client confidence and worries over wider economic and market conditions, she said.

The survey showed new business increased at a slower rate in December but companies continued to hire staff.

(Reporting by Sven Egenter; Editing by Susan Fenton)