After more than 12 hours of debate the vote on the spending blueprint for 2019, which already passed the lower house of congress last month, was 45 in favor, 24 against and one abstention.
Unions and civic groups protested all day outside the congress building during a debate that lasted into the wee hours of Thursday.
The bailout is supposed to help Argentina recover from an economic crisis that has seen the peso lose half of its value this year.
Inflation is forecast to finish the year at 40 percent and the economy is expected to shrink by 2.6 percent next year.
Center-right President Mauricio Macri has pledged a swathe of cuts in health, education, science, transportation, public works and culture next year to the tune of $10 billion.
To halt the collapse of the peso back in April, Macri’s government reached a bailout deal with the IMF, with which Argentina had practically severed relations after defaulting on its foreign debt in 2001.
Street protests have reflected growing public anger after Macri slashed traditionally safe civil service jobs as part of a bid to cut Argentina’s fiscal deficit and tame inflation at the IMF’s behest.
The budget deficit was 3.9 percent of GDP last year. The government aims to get it down to 2.7 percent in 2018 and zero by the end of next year.
Macri’s Cambiemos coalition lacks a majority in congress so it needed support from part of the Peronist Justice Party to get the budget passed.
The budget “calls for sacrifice as part of a crisis that blew up everything. Voting against it would send a very bad signal at the international level,” said Miguel Angel Pichetto, head of the Justice Party bloc in the lower chamber.
The protests outside the chamber were less boisterous than street unrest triggered by the vote in the lower chamber last month which at one point caused debate to be suspended.
“The people are against this budget. They were against the idea of asking the IMF for a loan. But no one hears us,” said one of the demonstrators, Ana Maria de Jesus, 67.
Despite all the complaints, the vote Thursday went smoothly as Macri has reached agreement with Argentina’s provinces on providing them with financing even with all the spending cuts.
The vote came a day after S&P cut Argentina’s long-term foreign and local currency ratings to ‘B’ from ‘B+’ following a review dating back to August.
“There has been an erosion of Argentina’s economic growth trajectory, inflation dynamics, and debt profile following setbacks in implementing its challenging economic adjustment program,” S&P said.