Nicola Sturgeon and Carwyn Jones have issued a joint statement saying it would be "unacceptable" for the UK to leave the EU against the wishes of people in Scotland and Wales.

The Nationalist First Minister of Scotland and Labour First Minister of Wales said steps should be taken to prevent such an outcome.

Mr Jones stopped short of backing Ms Sturgeon's demand for a "double majority" in the in/out referendum on Britain's membership of the UK which is due to take place by the end of 2017.

However, their joint communique sent a powerful message to Prime Minister David Cameron about the level of disquiet in both Scotland and Wales over the Euro plebiscite.

The two leaders also agreed to campaign for EU nationals and 16- and 17-years to be given a vote in the referendum, and to resist Mr Cameron's plan to repeal the Human Rights Act.

In their joint statement, they said: "Any decision to leave the EU, taken against the wishes of the people of Wales or Scotland, would be unacceptable and steps must be taken to ensure this does not happen."

Ms Sturgeon has said her MPs will try to amend legislation paving the way for the EU vote to give each of the four UK nations an effective veto over the UK's withdrawal.

Under her plans, any of the four nations could block Britain's exit if a majority there voted to stay.

Mr Jones did not endorse the plan but said: "I am concerned of the effect on Wales if there was a vote to leave the EU but Wales voted to stay.

"It was useful to discuss the constitutional effects on both Wales and Scotland of a potential UK exit, without support in the four nations."

Ms Sturgeon said: "I have already set out that we see the European Union as vital for our economy and we will make an overwhelmingly positive case for continued membership.

"We also agreed that any decision to leave the EU, taken against the wishes of the people of Wales or Scotland, would be unacceptable and steps must be taken to ensure this does not happen."

Their joint statement said 480,000 jobs in Scotland and Wales depended on exports to the EU.

The two leaders pledged to campaign positively for a Yes vote to stay in the EU and urged Mr Cameron to "take account of our views in any proposals for EU reform".

They called on him to widen the franchise for the referendum, saying it must meet "the highest standards of inclusivity".

The two first minister also committed to fighting the Conservatives' planned spending cuts.

In a sharp shift away from comments she made during the election campaign, when she claimed the Charter for Budget Responsibility passed by MPs earlier this year would lead to £30billion of cuts, Ms Sturgeon acknowledged the Government could keep the formal pledge to reduce the deficit without the need for austerity on such a scale.

She and Mr Jones warned of "huge and damaging cuts over the coming years".

But they agreed: "Both the Scottish Government and Welsh Government believe the UK Government can meet its fiscal mandate without imposing damaging cuts to spending and on social security currently proposed.

"We call on the UK Government to reconsider its plans, to support economic growth and to ensure the poor and the vulnerable are protected."

They warned Mr Cameron's plan to abolish the Human Rights Act sent the wrong message to the international community and added:

"It is also clear that UK ministers has given absolutely no thought to the implications of such a move for devolved government in the UK, with the Act being embedded in the devolution settlements of Wales and Scotland and in the Good Friday Agreement.

"Both our governments are fundamentally opposed to this regressive move and will do everything we can to resist it."

Ms Jones added later: "It would be wholly wrong to change the constitutions of Wales and Scotland by repealing the Human Rights Act without the consent of the two countries."

The two leaders also said their governments should be given a "leading role" in shaping legislation to devolve further powers to Scotland and Wales.

"Where the people of Scotland and Wales have demonstrated a demand for greater powers it is incumbent on the UK government to respect those views," they said.