Nicola Sturgeon has written to EU leaders calling for a Brexit extension long enough to allow a second referendum on the UK's departure to be staged.
The First Minister and her Welsh counterpart Mark Drakeford have sent joint letters to both Prime Minister Boris Johnson and EU President Donald Tusk setting out concerns over the Withdrawal Agreement Act which was published today.
They warn that the devolved administrations in Cardiff and Edinburgh are required to give consent for the legislation which the UK Government is seeking to fast-track through Westminster to meet the UK's scheduled departure on 31 October.
In the letter to Mr Tusk the leaders say that it will be impossible to carryout the "detailed and adequate scrutiny" of the legislation in this timeframe.
"While clearly it is a matter for the Council to consider how long such an extension should be, we would favour one which is long enough to enable a referendum with remain on the ballot paper to be held in the UK," it adds.
"Both of our Governments and legislatures are in favour of such a referendum and of the UK remaining in the EU."
EU leaders are currently considering whether to grant an extension which has been requested by Mr Johnson and would be required to avoid a "No Deal" exit if Westminster does not pass the current Withdrawal Agreement legislation by the 31 October deadline.
The letter to Mr Johnson says that the Bill will be among the "most important pieces of legislation ever considered" by the UK Parliament, the Scottish Parliament and National Assembly for Wales, with "far-reaching implications for" the entire UK.
It adds: “Both our governments believe the deal you have negotiated with the EU will be even more damaging to Wales, Scotland and the United Kingdom than the previous unacceptable agreement made by your predecessor.
“It is essential that your government respects devolution, the legislative consent process and any decisions on consent that the Scottish Parliament and National Assembly may reach.”