FRANKFURT, Germany — A key survey of German business optimism rose sharply in February, adding to the evidence that the country will avoid a recession.

The Ifo index released Friday rose to 107.4 from 104.3 in January. It was the fourth monthly increase in a row and well above the 104.9 points expected by financial market analysts.

Germany's economy shrank 0.6 percent in the fourth quarter of 2012 and another drop in the first three months of this year would meet the common definition of a recession as two quarters of shrinking economic output. But many economists expect a rebound now that fears over the euro countries' debt crisis have eased.

Friday's figure follows an in increase in the ZEW index based on surveys of investment analysts released Tuesday.

A German rebound could help the economy of the 17 European Union countries that use the euro work its way out of recession later this year.

Analyst Rob Wood at Berenberg Bank wrote in a note to investors that "our base case is that German should be embarking on another period of strong growth, which will also help the rest of the eurozone by boosting demand for their exports.

Also Friday, Germany's Federal Statistical Office posted a better-than-expected budget surplus in 2012 in spite of the contraction in the fourth quarter. The office said in a release Friday that Germany posted a 0.2 percent surplus for 2012 under official EU debt criteria – better than the 0.1 percent predicted in January.

Carsten Brzeski at ING said the German economy's strengths were increasingly setting it apart from other eurozone countries that are trying to cut debt and improve growth. Germany is relying on strong exports to markets outside the lagging eurozone. It also has low unemployment so that consumers can spend, a balanced budget that means it doesn't have to continually cut spending, and low interest rates.

"While most other Eurozone countries remain stuck in recessionary territory, preoccupied with structural reforms and austerity, German businesses are surfing on the wave of optimism," he said.