A vote to leave the EU would break up the UK if it was won without majorities in each of the four nations, the first minister has warned.
Carwyn Jones said he did not think Scotland would stay in the UK if the referendum result was to quit Europe.
Plaid Cymru leader Leanne Wood asked if he backed the idea of a "double majority".
He said it would be "legally difficult" but morally "right" to require voters in all four nations to back the result.
"I don't think the UK would survive if the UK were to leave the EU on the basis of votes from one or two of the constituent nations," Mr Jones said during First Minister's Questions in the Senedd on Tuesday.
"I don't think Scotland would remain part of the UK if the UK was no longer a member of the EU.
"I think it would create immense difficulties for Wales as well, none of which is easy to resolve.
"I do not think it would be in the interests of the UK to leave the EU if it was done without a majority in Scotland, Wales and Northern Ireland.
"Legally difficult, [but] morally I think that's absolutely right."
The first minister also said it would be wrong for the UK government to abolish the Human Rights Act in Wales without assembly consent.
Mr Jones renewed his call for Wales to have a separate legal jurisdiction in order to take its own decision.
"If the Human Rights Act is abolished it changes the constitution of Wales, and that cannot be done without the approval at least of this institution," he said.