With the clock ticking on the end of the two-year session, House and Senate leaders finalized a deal Thursday to tax and regulate short-term housing rentals through websites like Airbnb, reviving a bill that passed in July but was imperiled by concerns raised by Gov. Charlie Baker.

The new version still would apply the 5.7 percent hotel and motel room tax to units rented on a short-term basis. Legislative leaders, however, agreed to a change proposed by Baker that would exempt homeowners who rent out their units for 14 or fewer days a year from having to collect the tax.

The House and Senate also agreed to postpone an extra Boston Convention and Exhibition Center financing fee on short-term units rented in Boston, Cambridge, Worcester, Springfield, West Springfield and Chicopee for about 10 years, or until the bonds on the BCEC are paid.

"We're excited that we were able to accomplish this before the end of the year because there were a lot of twists and turns throughout the process, but we got it done," said Rep. Aaron Michlewitz, the co-chair of the Committee on Financial Services.

The House and Senate reached a compromise in the final days of formal sessions in July to tax and regulate short-term rentals, but Baker sent the bill back with amendments, proposing, among other things, to exempt homeowners who rent out their units for fewer than 15 days a year.

The governor also wanted to limit the amount of information that will be made available through a proposed public registry of short-term rental housing units.

"The administration remains hopeful that the Legislature will reach an agreement to better level the playing field against short term rental operators using their properties as de facto hotels and will carefully review any final legislation that reaches the governor's desk," Baker spokesman Brendan Moss said in a statement.

Michlewitz, who negotiated the short-term rental bill for the House, was on hand during an informal session Thursday when the House formally rejected the amendment offered by Baker and adopted Michlewitz's further amendment. The Senate also accepted the amendment.

The North End Democrat said the governor's office was "involved in all the conversations and all the negotiations," and described the final amendment as one that both Baker and Senate leaders had signed off on.

Sen. Michael Rodrigues, the Senate negotiator on the bill, said the new version of the bill is the product of "good work and cooperation between the House, the Senate and the governor's office."

"When the governor signs it, I'll be very happy. The Senate has been on record wanting to do this for a number of years," Rodrigues said.

The bill reached Baker's desk Thursday night, giving the governor 10 days to review the final redraft and decide whether to sign this new version. The new legislative session begins on Jan. 2, and Baker gets sworn in for his second term on Jan. 3.

Airbnb urged Baker on Thursday to veto the new compromise legislation and allow the next Legislature to debate the issues at stake all over again.

"This bill raises serious concerns for the thousands of Bay Staters who share their home to make a little extra income. In addition to undermining the Governor's effort to shield hosts' personal information, the bill would impose significant burdens on individual hosts, many of whom rent their homes for just a few weeks a year," company spokeswoman Liz DeBold said.

Taxes under the new version of the bill would take effect on all units rented for after July 1, 2019. Cities and towns would also have the authority to levy additional local taxes.

While the House and Senate agreed to Baker's exemption for casual renters, the new version of the bill stipulates that if a property owner exceeds the 14-day limit, they must remit taxes for all of those days, not just day 15 and beyond.

"The House, Senate and governor's office all believe that's going to be a small amount of hosts at the end of the day, but it is also some people who may not want to do this on a regular basis. It will help ease the burden for them," Michlewitz said.

Baker's office estimates the exemption will impact one-sixth of operators, and reduce tax revenues by 1 percent, or $300,000. Legislators had previously estimated that the bill would generate $25 million in state taxes and another $25 million in local taxes.

Rep. Sarah Peake, a Provincetown Democrat and member of House leadership, was optimistic about the new bill's chances Thursday afternoon.

"I'm thrilled that it's done and hopeful the Senate will accept the amendment and we can get it across the goal line," Peake said.

Michlewitz said the goal would also be to get the short-term rental registry up and running by the end of September. The compromise addressed Baker's concerns over privacy by stipulating that the addresses used to register units with the state would be published with the street name, but not a street number.

While this could make it difficult to discern which neighborhood a specific unit on a longer street is located in, Michlewitz said cities and towns would still be allowed to require full street addresses for local directories.

"I think Boston will end up doing that," Michlewitz said.

Cities and towns also would still be able to add additional taxes on second-units operated by a single owner, with a portion of the revenue generated to be earmarked for affordable housing in that municipality.

"Those second units was one of the big concerns in some of the major urban areas, Boston included, where they would end up taking up the housing stock," Michlewitz said.

As for the BCEC fee, the original bill from July proposed to apply the same 2.75 percent paid by hotel and motel guests in the seven impacted communities to short-term rentals. Baker, however, worried that the proposal to split the new proceeds between the state's general fund and the host community would be a violation of the terms of borrowing for the convention center.

The new bill calls for the 2.75 percent tax on short-term rentals to kick in after the bonds are paid, when all proceeds from the tax on hotels and motels would also start to flow, under law, into the state's general fund.

SHNS' Katie Lannan contributed reporting.