The Senedd has passed plans for a £1.30-a-night tourism tax in parts of Wales from 2027.
Senedd members voted 37-13 for the tourism tax bill which will see people charged £1.30 each, plus VAT, for stays in hotels, B&Bs and self-catering accommodation.
People staying in hostels and campsites would pay 75p per person per night, with under 18s exempt from the lower rate of the tax which would be introduced in 2027 at the earliest.
The tax would raise around £33m a year if implemented across the country but the 22 local councils in Wales will be given powers to decide whether to introduce a levy locally.
Only two councils - Cardiff and Anglesey - have so far indicated plans to bring in a levy but other authorities had yet to make a decision or had "no plans" to introduce a tax.
The Vale of Glamorgan is among those who have previously indiciated they will not introduce the levy.
'Thriving'
A register of visitor accommodation providers operating in Wales will also be established by the bill, laying the groundwork for licensing plans set to be brought forward separately.
Proponents argue the levy will ensure visitors contribute to the cost of services with revenue reinvested, while detractors warn the tax will put tourists off and damage Wales' economy.
Tourism taxes are commonplace on the continent and, closer to home, Scottish councils will gain similar powers next year and Manchester introduced a visitor charge in 2023.
Leading a debate before the key vote on Tuesday, Mark Drakeford told the Senedd: "By passing this bill, we will give councils the choice to introduce a modest additional charge which would be reinvested to support a thriving, sustainable tourism industry."
The finance secretary said the visitor levy will be the first local tax for more than 500 years to have been designed and made in Wales, marking an important step for devolution.
'Dire straits'
Prof Drakeford said the Welsh Government wants to ensure the pressures and opportunities of tourism are fairly balanced, with visitors contributing to infrastructure and services.
The former first minister pointed to evidence "from Iceland to New Zealand" of the revenue generated contributing significantly to challenges without deterring tourism.
He argued the bill would strengthen communities and build democratic accountability, putting tourism in Wales on a new and sustainable footing.
But Sam Rowlands, the Conservatives' shadow finance secretary, described the bill as "bad for Wales and bad for the Welsh tourism sector".
Warning the economy is in dire straits, Mr Rowlands said the tourism tax will impact jobs and harm the economy as he pointed out that the industry itself was broadly opposed.
'Out of touch'
The tourism tax bill was introduced as part of the Welsh Government's now-collapsed co-operation agreement with Plaid Cymru between 2021 and 2024.
Luke Fletcher, Plaid Cymru's shadow economy secretary, reiterated his party's support, saying: "There is a genuine opportunity here for us to create a sustainable tourism sector that works with both our communities and businesses."
Mr Fletcher added: "The very same arguments were happening when they were looking to introduce a tourism levy in Barcelona and in other places, so I do really believe we will look back at this as a positive step forward for our communities."
Labour's Jenny Rathbone criticised the Conservatives for "being completely out of touch", with thousands visiting Cardiff for the Oasis concert and communities picking up the costs. She asked: "Why should poor people rather than visitors have to pay?"
Closing the debate, Prof Drakeford agreed, accusing the Tories of "catastrophising" a "modest measure" which he compared to less than the cost of a cup of coffee.

Swapping date night for drysuits at Barry Dock RNLI
13,900 French Rugby Fans fly into Cardiff Airport ahead of Six Nations Fixture
Vale Councillor blasts school funding in the county
Bear Field Skate Park set for major upgrade as part of new Placemaking Plans
New apprenticeship courses in construction to be introduced in Wales
Former Penarth Bank could become a cafe
New poll shows majority of Welsh voters lack voting confidence ahead of Senedd Election
Construction hub secured for rail upgrades
Prolific thief banned from Holton Road
Cowbridge: plans for more holiday lodges
Man dies suddenly in Romilly Park
Cash boost for Sully Primary School
Speed limits reduced despite objections
Concern over imported chicken in school meals
A48 closed after three-vehicle collision
Rhys unveils red bench 'in living memory'
Barry: plans lodged for 70-home development