A law offering relief to some New Jersey Shore homeowners and renters affected by a new tax on short-term rentals is poised to become law, after the Assembly passed a bill Thursday and sent it to Gov. Phil Murphy.

The bill is a tweak to the tax, which went into effect in October and is aimed at home-sharing platforms such as Airbnb.

If the bill becomes law, homeowners who rent their properties by dealing directly with a client — rather than using a website or other marketplace to contract and collect payment for rentals — would not have to collect the tax. Homes rented through licensed real estate brokers, as is the case for many Shore rentals, were already exempt.

Thursday’s vote came during peak vacation season. Some Shore homeowners have said the tax has made it difficult to rent their homes this year, and a group of them hired a lobbyist to fight for changes to the tax.

Airbnb has opposed the bill that passed Thursday, and highlighted Memorial Day weekend as record-setting for its rentals at the Shore. The company supported efforts to tax rentals through its site and has noted that doing so will generate substantial revenue for the state.

The so-called Airbnb tax, which took effect in October, applies the 6.625 percent state sales tax and 5 percent occupancy fee to short-term rentals. That raised about $3.3 million in state revenue from October through January, according to the state Department of Treasury.

New Jersey expects to raise $8 million in sales taxes from short-term rentals in fiscal year 2019. The Office of Legislative Services said it could not estimate the amount by which the changes approved Thursday would change tax revenue.

Some Shore homeowners said the tax would hurt them because they have long-standing relationships with clients who return every summer, and because they also use online platforms to find renters. Doing so allowed them to avoid broker fees, but homes rented through licensed brokers were exempt from the tax.

Duane Watlington, a Long Beach Island homeowner and founding member of the NJ Shore Rentals Coalition, which lobbied to change the tax, told a Senate committee in May that he was “having a hard time this year because of the tax.”

The bill gained broad support from lawmakers, passing the Senate on a 33-0 vote and the Assembly by a 74-0 vote and one abstention.