Argentina's Senate on Thursday gave final approval to an unpopular austerity budget designed to meet the stiff requirements of a $56 billion International Monetary Fund bailout.
Unions and civic groups protested all day outside the Congress during a debate that lasted into the small hours of Thursday.
Center-right President Mauricio Macri has pledged a swath of cuts in health, education, science, transportation, public works and culture next year to the tune of $10 billion.
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.
Macri welcomed the result of the vote on Thursday.
"This is something we set out to achieve for a majority of Argentines who understand that we have to begin to be responsible, serious, that we cannot continue to live above our means," he said.
The IMF welcomed the result as a "very positive step" which showed a "clear commitment by the Argentine authorities" to strengthen its economic policies.
However, opposition leader and ex-president Cristina Kirchner said the budget would only "deepen the suffering of the Argentine people."
- Street protests -
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 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.
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.
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.
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.
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.
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 to zero by the end of next year.
Peronist leader Kirchner -- now a senator -- said the budget "is really a blueprint designed to meet the zero deficit plan."
"Adjusting public spending does not get us out of recession, because what we are going to do is deepen the suffering of Argentine society."
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.