A bill that would temporarily exempt the Steamship Authority’s five port towns from covering any year-end financial deficit has cleared the state legislature and awaits a final signature from Gov. Charlie Baker.

The house and senate reconciled a final version of the supplemental 2020 state budget late last week, including an amendment that frees the cash-strapped port towns from potentially millions in tax assessments, instead shifting the burden onto the state.

“Due to decreased ridership during the pandemic, the SSA projects tens of millions in losses this calendar year,” a press release from state Rep. Dylan Fernandes’s office said Monday afternoon. “The legislation removes liability from the port communities for any revenue shortfalls as a result of the pandemic.”

A version of the bill passed the state senate approximately two weeks ago but needed approval in the house. Cape and Islands state Sen. Julian Cyr sponsored the amendment.

In a press release that went out Monday afternoon, Mr. Fernandes said he teamed up with Senator Cyr, as well as Falmouth Rep. Susan Moran to get the bill to the finish line.

“Residents of our district are already navigating financial uncertainty as a result of the pandemic and cannot afford to take on the Steamship Authority’s deficits,” Mr. Fernandes said in the release. “This legislation not only keeps the boats running, it keeps our towns afloat financially and saves local residents millions of dollars.”

The budget amendment has been months in the making, after traffic on the boat line plummeted at the beginning of the pandemic, causing a financial crisis to quickly snowball. The SSA is one of the only transportation agencies in the country that operates without state and federal subsidy.

Under the amended 1960 boat line charter, the five port communities — Falmouth, New Bedford, Hyannis, Nantucket and Martha’s Vineyard — are responsible for making up the difference in the event of a deficit. The SSA has not run a deficit since 1962.

But in mid-April, with traffic plummeting due to the pandemic, the prospect of a huge deficit loomed large. SSA general manager Robert Davis sent an urgent letter to Gov. Charlie Baker requesting immediate financial assistance. At first the response was muted, with the governor demurring and high-ranking state officials questioning the need in light of other forms of assistance that came through for the SSA, including some $12 million in CARES Act money.

Then earlier this month, Senator Cyr saw an opportunity to attach an amendment onto the state’s supplemental budget that would relieve the port communities from any tax liability on a one-time basis this year.

“During recent debates over the supplemental budget bill, Fernandes and Cyr worked alongside other legislators representing port communities to successfully advocate for the inclusion of the SSA amendment in the final legislation,” the Monday press release said in part.

Although ferry traffic has since seen marked improvement over the course of the summer, budget forecasts still call for a steep deficit this year, according to the press release.

One more step remains before the temporary save is signed into law.

“The supplemental budget bill is now on the governor’s desk,” the press release said.