German business sentiment climbed for the second month running in December as confidence in the outlook surged more than at any time in the last 2-1/2 years, boosting hopes Europe's largest economy will bounce back quickly after a weak end to 2012.

The Munich-based Ifo think tank said on Wednesday its business climate index, based on a monthly survey of some 7,000 firms, rose to 102.4 in December, up from 101.4 in November and the highest level in five months.

The reading beat the median forecast in a Reuters poll of 40 economists for the index to climb to 102.0 and boosted European stocks to their highest levels of the year. The euro also climbed against the dollar after the news.

Germany has been an engine of growth throughout much of the three-year old euro zone debt crisis, but it has recently suffered from sluggishness in the rest of the European Union, where Germany sells roughly 60 percent of its exports.

Economists expect the economy to contract in the fourth quarter of the year and the government is considering cutting its forecast for German growth next year from its current 1 percent expectation due to a weak half year over the winter.

Yet, the European Central Bank's promise to buy the bonds of stricken euro members, an agreement last week to release new aid to Greece and an upgrade of the country's sovereign debt rating have calmed markets somewhat.

"There is a certain calming down at the end of the year. Export expectations have risen. Companies are growing confident again," Ifo economist Klaus Wohlrabe told Reuters.

The firms polled by Ifo were more pessimistic about their current business conditions, with a sub-index falling to 107.1 from 108.1 in November.

But they were more upbeat about future prospects, with a sub-reading on business expectations increasing to 97.9 from 95.2, the biggest month-on-month rise since June 2010.

Last week, Ifo nearly halved its forecast for 2013 growth in Europe's largest economy to 0.7 percent but said domestic demand would help it pick up next year after a brief contraction this quarter.

Ifo said then that the cut, from a forecast for 1.3 percent growth made in the June, came because the euro zone's debt crisis had hit the economy later than expected, delaying the recovery.

(Reporting by Madeline Chambers, Noah Barkin, Christian Kraemer and Annika Breidthardt)