Hopes that Europe's economy might be on the mend were dented again Wednesday when the International Monetary Fund downgraded its forecast for the eurozone to a second consecutive year of recession.

But IMF managing director Christine Lagarde said she was optimistic about the outlook for the region, provided it keeps up the pace of reform.

In an update to its World Economic Outlook, the IMF forecast the eurozone economy will contract by 0.2% this year, after shrinking by 0.4% in 2012. Its previous forecast was for growth of 0.1% in 2013.

Protracted recessions in southern Europe states have begun to depress activity in the core of Europe, with even powerhouse Germany feeling the effects of the slowdown in the final quarter of the year.

Many of the 17 eurozone nations are in the middle of austerity programs that are reducing demand, driving unemployment to record highs and prompting households and businesses to defer spending and investment.

The debt crisis has abated in recent months, thanks to the ECB's pledge to buy short-term debt from struggling eurozone members. But while that has improved financing conditions for governments and banks, the IMF noted that this has not yet translated into improved borrowing conditions for the private sector.

Related: ECB holds rates as signs of stability emerge

But elections in Italy next month, Germany in September, and the restoration of calm on government bond markets have prompted some to warn that Europe may be tempted to slow its reform drive.

UBS chairman Axel Weber said he believed the eurozone was not over the worst, and that much of the progress achieved last year was driven by market pressure.

"Political risk might come to the fore again, that might spook markets," Weber told CNN's Richard Quest. "Like in 2012, some of the unresolved issues in Europe have the potential of coming back to the fore, spooking investors."

Lagarde said she was optimistic about the outlook for Europe, provided governments followed through on the progress made in 2012 to take the first steps towards creating a banking and fiscal union in the eurozone.

"They need to keep at it, they need to challenge the conventional wisdom that when things get better, it's time to relax," she said at the World Economic Forum in Davos. "It's not time to relax."

Lagarde acknowledged that the IMF and others had not paid enough attention to excess inequality and the corrosive effects it has on society. With 200 million people looking for work globally, policymakers needed to strike a better balance between the drive to balance budgets and the need to create growth and jobs.

"If we have any priorities, it is that one," she said.

More had to be done by governments to stop leaving a legacy of debt to future generations, she said, but cautioned that climate change may pose an even greater threat to the global economy.

"Without action, the next generation will be roasted, toasted, fried and grilled," Lagarde said.

The IMF said it expected global growth to reach 3.5% this year, up from 3.2% in 2012, and compared with its October forecast of 3.6%.

For the United States, the IMF stressed that "the priority is to avoid excessive fiscal consolidation in the short term, promptly raise the debt ceiling, and agree on a credible medium-term fiscal consolidation plan, focused on entitlement and tax reform."