AMs have backed the UK Government's Wales Bill in a Senedd vote - meaning the next stage of devolution can become law.

The bill promises new powers for Wales, but there have been claims it would reduce AMs law-making powers.

First Minister Carwyn Jones recommended AMs vote for the bill, saying it could be improved but "takes Wales forward".

But Plaid Cymru leader Leanne Wood suggested Wales had been "backed into a corner" over the legislation.

The vote was 38-17 in favour of the bill.

The Wales Bill offers to extend the transfer of powers over tax, energy, transport and the assembly's own affairs.

Welsh Secretary Alun Cairns said the vote meant the people of Wales were on track to get more say over "everyday decisions in their lives".

Labour - the largest group with 29 of the 60 assembly seats - agreed on Monday to back the legislation despite reservations.

It was joined in supporting the bill by the Conservatives, ensuring the motion to give consent to the bill passed.

UKIP and Plaid Cymru opposed the law - UKIP voted against because it devolved income tax without a referendum and Plaid because of the claimed "roll-back" in assembly powers.

The Wales Bill introduces a system of powers that are reserved to Westminster - such as defence and foreign affairs - with everything else assumed to be devolved.

But some have claimed that the new devolution model is unclear and have criticised the large list of reservations.

Image caption Carwyn Jones said it was in the "best interests of Wales" for the new law to be passed

In a debate on the bill in the Senedd, the first minister said: "On balance, I believe it is in the best interests of Wales as we look at dealing with the issue of Brexit that we take what is on offer today."

Mr Jones said the bill should be seen as "another step on what is a long journey of devolution".

However he said there was "a need for improvement" in some areas, such as the lack of devolution of air passenger duty.

He added it was "not possible to conclude that the reserved powers model, welcome though it is in theory, is fit for purpose in the long term".

"There is no other country that I know of where two legislatures exist in the same jurisdiction", he said.

"It's possible in the future that somebody might be arrested in Cardiff for something that is not an offence in Wales."

Image caption Leanne Wood said Wales should not be "backed into a corner again"

Plaid Cymru decided at a group meeting on Tuesday to oppose the bill. Sian Gwenllian, Simon Thomas and Elin Jones voted in favour, with the rest of the group against.

Ms Wood told the debate Plaid was voting against the Wales Bill "with a heavy heart".

"We never want to see Wales backed into a corner again," she said.

Her party supported the fiscal framework on Wales' funding negotiated between the UK and Welsh governments, she said.

But she added: "The UK Government did not have to tie the fiscal framework to a bill that would restrict our ability to make laws.

"The public finances of Wales should not be conditional on accepting a worsened legislative framework."

Image caption Andrew RT Davies said the Wales Bill offers a "huge responsibility" for the assembly over a number of areas, including income tax

Welsh Conservative leader Andrew RT Davies said: "Is any bill perfect? No it's not.

"But this bill offers a huge opportunity to take responsibility over energy, over transport, over electoral arrangements, over income tax - the list goes on."

He said it was a "sad day when Plaid Cymru in this chamber choose to vote against... [an] opportunity for a huge transfer of responsibility and sovereignty".

Image caption Neil Hamilton objected to the devolution of income tax without a referendum

UKIP group leader Neil Hamilton told the Senedd he supported the broad principles of the Wales Bill.

But he said the removal of the need for a referendum before income tax powers were devolved was a "constitutional deficiency we ought not to ignore".

He said it was an "important principle that politicians should keep their promises and should be held to their word".

Mark Reckless, UKIP AM for South Wales East, added: "They know if they did have a referendum they would lose."

Earlier on Tuesday, Mr Davies said the Welsh devolution settlement would need a rethink because of Brexit.

It is the fourth Wales Bill since the devolution process began in 1998 with the act which created the assembly.

Mr Davies said powers returned to the UK by the European Union after Brexit would require more legislation "to realign those responsibilities".

"This will not be the last Wales Bill, but it will be the last Wales Bill in this parliamentary session", he added.

Mr Davies also regretted the UK government's decision not to devolve powers over air passenger duty.

He said he thought it would be devolved eventually as there was "no coherent argument to hold it back".

What is in the Wales Bill?

Image caption The Wales Bill will change how power is split between Westminster and the assembly

New powers for the assembly including on energy, transport and teachers' pay

A new system for how power is divided between the assembly and Westminster, called reserved powers

Devolution of income tax powers

Under a political convention between the assembly and Westminster, the Wales Bill needed a legislative consent motion passed in the Senedd before it can be become law.

That is because the Wales Bill relates to devolved matters.

The convention does not have legal force but Wales Office minister Lord Bourne has said the bill would not become law if the assembly did not approve it.

The vote means the bill will now return to the House of Lords for the final stages on Wednesday - it is expected to gain Royal Assent in early February.