Image caption Carwyn Jones and Nicola Sturgeon want to prevent any loss of power devolved to Wales and Scotland

A proposal that could have given the Welsh Assembly power to veto key Brexit legislation has been rejected by MPs.

On the first day of detailed scrutiny on the EU Withdrawal Bill in the House of Commons, Plaid Cymru's planned amendment lost by 318 votes to 52.

It had the support of SNP MPs but Labour said before the vote they could not support the proposed change.

As it stands, Westminster wants support from the devolved nations but can push the planned law through without it.

The Welsh and Scottish governments have called the bill a "power grab" which undermines devolution.

Prime Minister Theresa May has warned she will not "tolerate" any attempt to block the legislation.

With Plaid only having four MPs, it needed support of politicians from other parties for the amendments to the bill to pass.

It is one of more than 350 tabled changes to the wording of the bill, which has passed its second reading and was scrutinised by MPs in the Commons on Tuesday.

The European Union (Withdrawal) Bill intends to convert all existing EU laws into UK law, to ensure there are no gaps in legislation on Brexit day.

But the Welsh and Scottish Governments have objected to the idea that EU responsibilities in devolved policy areas such as agriculture should first be held at Westminster, pending longer-term decisions.

While the administrations have no formal power in the Commons, they have suggested a list of amendments which have been tabled by SNP and Welsh Labour MPs to be discussed at committee stage this month.

Image caption Plaid Cymru MP Hywel Williams said the amendments would make sure all of the UK had a say in the final Brexit deal

Speaking ahead of the debate, Plaid's Brexit spokesman Hywel Williams MP said it would be "irresponsible and dangerous" if the prime minister were to "bulldoze her disastrous Brexit mirage through, against the will of three of the four members [of the UK]".

Mr Williams added: "This is not an attempt to derail Brexit - it is an attempt to make sure Wales and the other UK member countries have a say.

"Every national parliament should be involved in this process, not just Westminster."

A Welsh Government spokesman said the administration had "grave concerns" about the proposed legislation.

"There are still serious questions of how Westminster plans to honour the referendum while safeguarding the economy and respecting devolution and the established powers of the Welsh Government," he said.

The UK government has been asked to comment.