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.

Bro Radio Celebrates Sixth Community Awards at Barry’s Memo Arts Centre
Teen Makes Remarkable Recovery After Rare Swallowing Condition Leaves Him Unable to Eat or Drink
Barry Dock RNLI volunteer tackles tough cycling challenge in Europe
Community Planting Day Brings Generations Together at Victoria Park
First Minister quizzed on Welsh NHS pressures in his first-ever FMQs
Cardiff Airport welcomes over one million passengers as it becomes the UK’s second fastest growing Airport
17-year old Barry Island Stabbing victim undegoes life-changing leg amputation
Power connection problem hits Barry Island Public Toilet conversion scheme
A popular Vale of Glamorgan hotel could see a major development if plans are approved by the local council
Vale Council sets out 18 commitments and priorites for the year ahead
MS calls for more urgency in increasing frequency of train services on Vale Lines
Actions of 8-year-old saves his and his Granscha's life
The people of Wales are the least likely of all four nations to consent to organ donation
Vale Veteran Celebrates Remarkable 100th Birthday
Resurfacing work at Barons Court
RNLI issue reminder about keeping your children safe at the beach this Half Term
Public Health Wales and Diabetes UK Cymru have joined forces to call on people to know their risk of Type 2 diabetes
Wales will continue to display messages warning motorists about the dangers of leaving dogs in a hot car during spells of warmer weather