Had the result gone against it could have meant that assisted dying services were only available in Wales from private providers, not within the NHS.

MSs also backed a Plaid Cymru amendment criticising “the lack of thorough consideration of the constitutional implications of this bill for Wales”.

Several of them expressed concern with how the process worked out – with the Senedd having no say in whether or not assisted dying is actually made legal.

Regardless of how Tuesday’s legislative consent motion could have gone, if the law is passed in Westminster the practice would have been legal anyway, with Wales’ parliament only left with a decision about how to implement it.

If it clears the UK Parliament the issue falls to the next Welsh government, following an election in May, which would face the prospect of asking the Senedd to approve regulations for an assisted dying service.

The motion was backed by 28 Senedd members, with 23 against and two abstentions.

Voting tables show that while most Plaid Cymru and Labour MSs backed the vote, some ministers and senior figures in Plaid opposed the decision.

Mabon ap Gwynfor, Plaid’s spokesperson on the NHS, voted it down, as did deputy Plaid leader Delyth Jewell.