The Welsh and Scottish governments have said they will work together to try to keep the UK in the European Union.
Mark Drakeford and Nicola Sturgeon also called on the next prime minister to “change course and rule out” leaving the EU without a deal.
The first ministers are becoming “increasingly alarmed” by “hard-line rhetoric about a no-deal Brexit”.
The joint statement was released ahead of a meeting of the British-Irish Council (BIC) in Manchester on Friday.
The UK government’s de facto Deputy Prime Minister David Lidington and the Irish Taoiseach Leo Varadkar will also attend the meeting.
Welsh First Minister Mark Drakeford met Mr Lidington for a one-on-one meeting on Thursday night and is due to hold talks with the Scottish First Minister Nicola Sturgeon on Friday morning ahead of the BIC event.
In their statement the first ministers raised concern about the possibility of the UK leaving the EU without a deal at the end of the current negotiating period on 31 October.
Mr Drakeford and Ms Sturgeon said: “We believe leaving the EU without a deal would be disastrous for the economies within these islands and for the livelihoods of hundreds of thousands of people.
“A ‘no-deal’ Brexit would deeply damage the reputation of the UK as a reliable international partner and undermine the Good Friday Agreement and the peace process on the island of Ireland.
“The next prime minister must pull back from the brink of a ‘no-deal’ Brexit and be honest with the public.
“If they continue on their current path, the UK looks increasingly likely to crash out of the EU in just four months’ time,” they said.
Boris Johnson MP, the leading candidate in the contest to replace Theresa May as Conservative leader and prime minister, has said the UK must leave the EU on 31 October “deal or no deal”, but that the chances of a no-deal Brexit happening are a “million to one”.
His opponent Jeremy Hunt MP has said the UK “will leave without a deal” if there was no prospect of reaching an agreement by October.
Jeremy Hunt or Boris Johnson will be announced as the winner of the Tory Party leadership race on 23 July.
Following an awful set of results for Labour in the European elections in May, the Welsh Government announced a change of policy to fully back a second referendum.
On Wednesday, Mark Drakeford sent a letter to all Welsh MPs asking them to force the next prime minister to publish legislation by the end of July that would pave the way for another poll on EU membership.
The Scottish Government has long been supportive of a second referendum and in their joint statement the first ministers said they would work together in an attempt to force another vote.
The Welsh Government’s Counsel General Jeremy Miles and Environment Minister Lesley Griffiths will also be in Manchester on Friday for various meetings.