A declaration at the G7 meeting in Japan says a vote by the UK to leave the European Union would pose a “serious threat to global growth”.
In its final statement, the group warned that a UK exit from the EU would reverse the trend of increased global trade, investment and jobs.
The meeting brings together the world’s leading seven industrialised nations.
The final communiqué set global growth as a priority for dealing with threats to the world’s economy and security.
But the warning about the economic consequences of the UK leaving the European Union comes as Britain prepares for a referendum on 23 June.
Prime Minister David Cameron has been campaigning for Britain to stay within the 28-country bloc with recent polls suggesting a lead for those who support remaining within the EU.
Analysis: Karishma Vaswani, Asia business correspondent
That Brexit has been seen as a serious risk to the world economy at the G7 shouldn’t surprise anyone.
The G7 finance ministers meeting over the weekend in Sendai came to the same conclusion – and it was what the Japanese Central Bank Governor Haruhiko Kuroda told me in an interview earlier this week.
What is surprising is how much of an impact this communique says a yes vote will have on global growth – jobs, investment and trade will be affected.
But it’s also sentiment – investors are nervous about what Brexit will mean for confidence in Europe and how it will change the landscape of the world economy.
No one likes uncertainty, and with 26 days left before the referendum, expect a lot more of these sorts of global statements.
After two days of talks, the leaders of the US, Canada, Britain, Italy, Germany, France and Japan set global growth as an “urgent priority.”
The group pledged to “collectively tackle” major risks to global growth, including threats to the international order from terrorist attacks and violent extremism.
The statement promised to commit “to strengthening… policy responses in a cooperative manner and to employing a more forceful and balanced policy mix, in order to swiftly achieve a strong, sustainable and balanced growth pattern”.
“We remain committed to ensuring that growth is inclusive and job-rich, benefiting all segments of our societies,” the document added.
They also called for international markets to be kept open to fight all forms of protectionism and for countries to avoid competitive devaluations of their currencies.
The G7 has also released an action plan to counter terrorism which they hope will close “critical gaps” in capacity and international cooperation.
Aside from stepping up information sharing between countries and Interpol, they also said they would improve border control and aviation security.
Migrant crisis a global challenge
The communiqué described the migrant crisis in Europe “as a global challenge which requires a global response” of increased aid from international financial institutions and donor countries.
The statement went on to express “concern about the situation in the East and South China Seas” where maritime disputes have lead to increasing regional tensions over the past years.
While there is no mention of China and its expansion into territorially disputed waters specifically, the document calls for respecting freedom of navigation and for resolving conflicts peacefully through law.