An eleventh-hour vote at a specially scheduled City Council has cleared the way for legislation that could safeguard the Cambridge Housing Authority’s $382 million renovation of more than 2,500 apartments for low-income tenants.

City councillors Monday approved filing state legislation continuing a special tax agreement for public housing that officials said was necessary to allow the authority to fully fund its renovations.

The measure, which applies only to Cambridge, permits much lower payments under an agreement called “payments in lieu of taxes,” or pilot. The housing authority and many other large nonprofit property owners that are exempt from regular property taxes have negotiated such agreements with the city.

If the public housing developments were charged full real estate taxes instead, the authority stood to lose $23.2 million of its financing ability, authority officials said. That would curtail the scope of the project, which is intended to preserve the deteriorating housing for another 40 years. Keeping the current payment program wouldn’t hurt city finances because payments won’t be lower than they are now, City Manager Richard C. Rossi said.

The authority’s payment agreement was in danger because the agency is tapping private money to help pay for the huge project, under a federal program called Rental Assistance Demonstration. Part of the money comes from investors who contribute millions of dollars in return for getting federal tax credits to invest in low-income housing – a plan the authority turned to after trying for years to get federal funding through more traditional methods.

To get the tax credits, the investors have to own a 99.9 percent interest in the property for the 15-year term of the credit. The authority continues to manage the buildings, owns the land underneath them and has promised that the apartments will remain low-income and tenant protections will continue.

The state Department of Revenue issued an opinion in February finding that the non-tax payment program couldn’t continue because the new owner was a business that could theoretically earn a profit, despite the legal commitments keeping the housing for low-income people.

In response, state Rep. Marjorie Decker filed legislation in June allowing the payment agreements to continue under circumstances similar to the Cambridge plan. The measure appeared to be working its way successfully through the legislative process, when opposition suddenly surfaced two weeks ago, reportedly from officials of the administration of Gov. Charlie Baker.

Authority officials said they were told that the administration objected to a broad bill, but would accept a measure applying only to Cambridge. City councillor Marc McGovern introduced what he said was an emergency measure Nov. 9: a home-rule petition to continue the payment program just in Cambridge. Quick action was needed because the deadline for filing new legislation is Wednesday, authority general counsel Susan Cohen said.

The move appeared to take councillors by surprise, and no authority officials attended the meeting to explain. Councillor Tim Toomey, also a state legislator, used his power to delay a decision by one meeting – but with a “roundtable” with the School Committee replacing this week’s regular council meeting, the deadline would have been missed. A special meeting had to be scheduled to ensure that didn’t happen; it was held before the roundtable.

On Monday, with authority officials present, councillors took about 10 minutes to approve the home-rule petition. Then they took two other votes on technical issues that Toomey said would allow him to deliver the measure to the House clerk the next morning. After that, the bill will probably go through three committees and a public hearing before coming before the full House and Senate, Toomey said. Previously, he had said delaying a council vote would make no difference, because “even if we file this bill tonight” it would not go to a hearing before January or February.

“We are pretty confident we can expedite this pretty quickly,” Toomey said.

The authority’s executive director, Greg Russ, said the delay in getting approval to maintain the payment agreement “will not slow us down at this point.” If the measure is not approved, it could affect the second phase of the project beginning next year, Russ said.

There are some 6,000 households on an authority waiting list for housing in Cambridge, but the list is essentially frozen during the renovations.