Image caption German manufacturers in particular were more upbeat about the future

German business confidence rose for the second month in a row in December, according to a closely-watched survey.

The influential Ifo Institute's monthly index, based on a survey of 7,000 companies, rose by more than expected to 102.4, from 101.4 in November.

The think tank said manufacturers were "far more optimistic about the future than previously".

Analysts said the index suggested any expected contraction in the country's economy would be short-lived.

"As the year draws to a close, German companies are more confident about the future," said Ifo's president Hans-Werner Sinn.

Ifo's expectations index rose to 97.9 from 95.2.

'Clear message'

The German economy - Europe's largest - grew by 0.2% between July and September, and many analysts think the economy will shrink in the final three months of the year.

This was borne out in firms' assessment of the current business climate, which worsened slightly, to 107.1 from 108.1.

"With a worsening current assessment but improving expectations, today's Ifo sends a clear message - things will get worse before they get better," said Carsten Brzeski of ING.

"It looks as if any contraction of the economy should be short-lived."

Heinrich Bayer of Postbank Research said should the economy contract in the final quarter, it was unlikely to do so again at the beginning of next year.

"The economy should avoid a recession by a whisker," he said.