The final version of Mayor Michael Bloomberg's $65.72 billion budget for 2012 will allow the fire companies to stay open.
A formal vote must take place on or before June 30 and the fiscal year begins July 1.
Uniformed Firefighters Association President Steve Cassidy thanked city council members and said that closing the firehouses would have jeopardized the safety of residents and firefighters.
In May, a list of 20 firehouses that were targeted for closure due to budget cuts was released after pressure from the fire unions.
After the list was released, Fire Commissioner Salvatore Cassano said closing the companies would slow emergency responses around the city and put lives in danger.
Earlier this month, 15,000 demonstrators crossed the Brooklyn Bridge to City Hall in protest of the closings.
This is the third consecutive year that the City Council has helped rescued fire companies from being shut down by budget cuts.