The outgoing head of the World Bank, Robert Zoellick, will warn the G20 summit that Europe runs the risk of sparking a Lehman-style global crisis that will have dire consequences for developing nations.

As Greek voters go to the polls in elections that could determine the future of the eurozone, Zoellick told the Observer he was advising emerging nations to ready themselves for the consequences of events in the single-currency area.

The election of an anti-austerity government would spark the most serious crisis for the euro so far, following the apparent failure of a Spanish bank bailout last week. German chancellor Angela Merkel yesterday ruled out renegotiating Greece's bailout, saying the country must stick to its deals with international lenders. Unofficial polls suggest the conservative New Democracy party is ahead of the anti-austerity Syriza by four percentage points — though as much as 15% of the electorate remains undecided.

As all eyes focus on Athens, Zoellick said: "Europe may be able to muddle through but the risk is rising." He added: "There could be a Lehmans moment if things are not properly handled." The bankruptcy of Lehman Brothers in September 2008 proved to be the trigger for the deepest slump in the global economy since the 1930s, and Zoellick said developing countries needed to "prepare for the uncertainty coming out of the eurozone and the wider financial markets". He added: "It will be better if they can avoid piling up short-term debts that can come due in volatile periods and look to the fundamentals of future growth – infrastructure and human capital."

Zoellick, whose five years at the bank has coincided with the financial and economic crisis, retires at the end of the month. Fearing that Europe's sovereign debt problems could have spillover effects, he said the bank had been increasing its lending to support Bulgaria's banking system and acting to prevent a credit crunch in south-east Europe. Steps were also being taken to protect countries in north Africa that were vulnerable to Europe's debt crisis and trade finance facilities were being strengthened for francophone west Africa.

"Uncertainty in markets is now starting to increase costs for developing countries," he said. "The ripple effects are making everybody's life harder." Zoellick said his organisation was concentrating on helping developing countries to prepare projects that could go ahead with the right investment and to protect the most vulnerable if there was a second leg to the global downturn.

"Given the volatility in the world economy, there is a big emphasis on helping developing countries to develop social safety nets that don't bust the budget," he said. Countries such as Mexico and Brazil, he added, had shown they could do this using low-cost, effective targeting, information technology and the right incentives.

While the World Bank's sister organisation, the IMF, has been more directly involved in the rescue operations for Greece, Ireland and Portugal, Zoellick said that the bank had been monitoring events in Europe carefully. Higher interest rates for countries such as Spain and Italy, which have announced big structural reform programmes, were the result both of market uncertainty and the failure of other European countries to provide "the right backing" for the governments in Madrid and Rome.

As the former US trade representative, Zoellick said he was concerned that the prolonged crisis was starting to lead to pressures for protectionism and economic nationalism. "This is not just an economic crisis but a political threat as well," he said. "We must make sure we keep markets open and beware against creeping protectionism. We are starting to see some increase in the use of trade restrictions."

Several European leaders urged Greeks to stick with the euro, including Spain's prime minister Mariano Rajoy and Jean-Claude Juncker, who is Luxembourg's prime minister and head of the group of eurozone finance ministers.

"If the radical left wins [in Greece] – which cannot be ruled out – the consequences for the currency union are unforeseeable," Juncker told the Austrian newspaper Kurier. "I can only warn everyone against leaving the currency union. The internal cohesion of the euro zone would be in danger."