Hawaii lawmakers eager to gather tax revenue from the state’s flourishing, yet mostly unpermitted, vacation rental sector Tuesday passed legislation that would require websites like Airbnb to collect and pay taxes on behalf of short-term rental hosts.

The state House and Senate both approved separate bills Tuesday. Senators and representatives are expected to meet later this month to discuss differences.

Attempts to enact similar measures have failed in Hawaii in past years, but lawmakers said they believe they have a better chance of succeeding this time.

Many Hawaii vacation rentals are operated illegally, making tax collection more challenging. The transient accommodations and general excise taxes the short-term rental operators must pay are levied by the state.

The necessary permits for short-term rentals are issued by counties, which have varying regulations that are often poorly enforced. Honolulu, the most populous county, has not issued new permits since 1989. It’s estimated to have 800 legal vacation rental and bed-and-breakfast units and about 10 times as many illegal ones.

Vacation rentals are increasingly popular with travelers. But critics say they disrupt residential neighborhoods and exacerbate Hawaii’s acute housing shortage.

States across the country vary as to whether short-term rental owners pay taxes or whether websites collect the taxes on behalf of hosts.

Rep. Richard Onishi, chairman of the House tourism committee, said Hawaii’s four main counties are making progress in crafting laws and rules to better regulate vacation rentals. The state’s role, he said, is to make sure government is getting its tax revenue.

“We’re trying to capture the taxes from people that are doing the business in Hawaii. Which is the state’s responsibility,” said Onishi, a Democrat representing Hilo and Volcano.

Major vacation rental platforms object to both bills, saying they require turning over the personal information of site users in violation of federal law.

Expedia Group, which owns HomeAway.com and VRBO.com, said in a statement that the legislation also threatens Hawaii’s tourism economy.

Airbnb said in written testimony that the purpose of any tax bill should be to help ensure the assessment, collection and payment of taxes and “not to use confidential tax information to facilitate the Department of Taxation’s enforcement of county land use laws.”

Hotel owners have been clamoring for a vacation rental tax collection mechanism for years, said Mufi Hannemann, the president of the Hawaii Lodging and Tourism Association. “We want a level playing field. If we’re paying taxes, if we’re paying fees, we want them to do the same,” said Hannemann, whose group’s members operate 50,000 hotel rooms across the state.

Lawmakers passed legislation several years ago similarly requiring vacation rental platforms to collect taxes on behalf of hosts. But Gov. David Ige vetoed the bill, saying he was concerned it would encourage the growth of illegal rentals lacking county permits.

Ige spokeswoman Jodi Leong said the governor is withholding comment on the bills until they undergo a formal legal and departmental review.

But state Sen. Glenn Wakai said he has been consulting Ige’s chief of staff along the way, and he’s receptive to what the Senate has been doing. Onishi said he has been working with the state Department of Taxation and Attorney General’s office to make sure the House’s legislation doesn’t violate federal law and will work for tax officials.