World leaders gathering in Japan have warned that a vote by the UK to leave the European Union would pose a “serious threat to global growth”.

In their final statement, G7 leaders have said that “a UK exit from the EU would reverse the trend towards greater global trade and investment, and the jobs they create, and is a further serious risk to growth.”

Student or retired? Then this plan is for you.

The also said that “escalated geopolitical conflicts, terrorism and refugee flows, are complicating factors in the global economic environment.”

The G7 warning comes as the campaign ahead of the vote on the UK’s membership in the EU on 23 June heats up.

European Commission president Jean-Claude Juncker’s chief-of-staff, Martin Selmayr tweeted from Japan about the “horror scenario” of a G7 with populist leaders.

"#G7 2017 with Trump, Le Pen, Boris Johnson, Beppe Grillo? A horror scenario that shows well why it is worth fighting populism," he wrote.

Selmayr’s comparison of Boris Johnson, a leading conservative British politician campaigning for the UK’s exit from the EU, with France’s far-right leader Marine Le Pen, drew criticism.

Johnson for his part on Thursday criticised the British prime minister David Cameron for failing to bring down the number of immigrants arriving to the UK, a promise of Cameron’s Tory government, and a key topic in the Brexit campaign.

Johnson’s comments came as new figures released on Thursday showed a rise in immigration to the UK.

According to the Office for National Statistics office net migration rose to 333,000 in 2015, an increase of 20,000 compared to the previous year and the second-highest figure on record.

The numbers do not suggest the surge in immigration is due to the UK’s membership in the bloc. The figure however is above the goal set by the government, which pledged to reduce net migration to below 100,000 a year.

The increase in numbers gives fuel to the Leave campaign’s argument that migration is caused by the UK giving up some sovereignty to the EU.

Johnson told the BBC that the statistics “show the scandal of the promise made by politicians repeatedly that they could cut immigration to the tens of thousands and then to throw their hands up in the air and say there’s nothing we can do because Brussels has taken away our control of immigration.”

Plan B

In the meantime, European leaders are preparing for the scenario that the UK might vote to leave the bloc.

Plans have been drawn up to further integrate among the 27 member states in case Britain decides to leave.

But instead of closer monetary union, EU leaders and Brussels politicians are considering a closer security and defence cooperation, something that they hope can be achieved more easily than tighter economic integration.

According to the Financial Times leaders are preparing to calm financial markets after a possible Brexit and expect to hold a special summit of EU leaders, without Britain, to discuss the bloc’s response.

A full EU summit is scheduled for 28-29 June, a few days after the UK’s referendum.

Officials also worry that Britain’s referendum might trigger other anti-EU political forces in Europe to call for an in and out vote, and they plan tough divorce conditions for the UK to dissuade others from calling for a referendum.

Danish worry

In an unusual diplomatic move, 10 former Danish foreign ministers called on Britain in an open letter to remain in the EU.

"Britain must not relinquish its responsibilities," they wrote in the letter published on Friday's in the Times in London.

The former ministers argue the referendum is not just a British vote, but something that effects the whole of Europe. They say that a yes vote is necessary to ensure peace and freedom in Europe.