Shanghai/London: The global economy will suffer a "shock" if Britain leaves the EU, finance ministers and central bankers from the world's biggest economies including India have warned, boosting Prime Minister David Cameron's strong stand against leaving the bloc.

A so-called Brexit would would be a "shock" that ranks among rising downside risks and vulnerabilities for the world economy, the G20 finance ministers and central bank chiefs said after a meeting here in Shanghai, China's gleaming financial metropolis.

"Downside risks and vulnerabilities have risen, against the backdrop of volatile capital flows, a large drop of commodity prices, escalated geopolitical tensions, the shock of a potential UK exit from the European Union and a large and increasing number of refugees in some regions," they said in a joint communique at the end of a two-day G20 meeting in Shanghai yesterday.

RBI Governor Raghuram Rajan along with Additional Finance Secretary Dinesh Sharma attended the meeting.

Britain will hold a referendum on membership in the EU on June 23, and markets are becoming increasingly concerned about the impact on trade, jobs and investment if voters choose to leave the bloc of 500 million people.

UK Chancellor George Osborne described the prospect of a UK exit from the 27-member European Union as "deadly serious."

"The financial leaders of the world's biggest countries have given their unanimous verdict. They say that a British exit from the EU would be a shock to the world economy," Osborne told the BBC in Shanghai. "If it's a shock to the world economy, imagine what it would do to Britain."

Some prominent politicians, including London mayor Boris Johnson, have backed the Brexit campaign. Opinion polls show voters in Europe's second biggest economy are deeply divided over the issue, and many remain undecided.

British Prime Minister David Cameron argues that being part of the EU is good for the British economy. But his opponents say EU membership is costly, creates regulatory red tape and allows unlimited immigration.

In Shanghai, IMF managing director Christine Lagarde told reporters the issue was included in the G20 communique "as soon as the meetings really effectively started".

US Treasury Secretary Jacob Lew emphatically backed a vote to stay in the EU.

"Our view is that it's in the national security and economic security of the United Kingdom and European Union and of the US for the UK to stay in the European Union," he said, adding that meant a "more secure world".

Meanwhile, Prime Minister Cameron today warned that gaps in the case for a Brexit made it the "gamble of the century".

In an article for the Sunday Telegraph, Cameron wrote, "When the people campaigning for 'out' are asked to set out a vision outside the European Union, they become extremely vague."

"It's simply not good enough to assert everything will be all right when jobs and our country's future are at stake," he said.

Cameron also dismissed suggestions that Britain could still have access to the EU single market while opting out of the free movement of people.

He questioned what would happen to European security cooperation, and challenged the idea that Britain would have more influence on the world stage if it went it alone.

"There is no doubt in my mind that the only certainty of exit is uncertainty; that leaving Europe is fraught with risk," he wrote.

Cameron is also trying to persuade members of his Conservative party. Six senior ministers are backing a Brexit, along with significant numbers of Tory MPs.

Reacting to the G20's move, The UK Independence Party (UKIP) leader Nigel Farage said the G20 announcement was "no surprise" as it was "mates helping each other out".

"I'm not surprised that big government gets together to support David Cameron," the leader of the Eurosceptic and right-wing populist political party added.

"This is big banks, big business, big government all scratching each other's backs. I don't think that impresses voters."

Officials travelling with Mr Osborne say the mention of the UK's referendum in the G20 meeting's final communique is unusual. Osborne has denied he pushed for it.

The chancellor told the BBC: "The financial leaders of the world's biggest countries have given their unanimous verdict and they say that a British exit from the EU would be a shock to the world economy."