The Senate gave final congressional approval Tuesday to an overhaul of Brazil’s pension system, capping years of stalled efforts to sway public opinion and rein in unsustainable government spending on retirement.

The Senate voted 60-19 to adopt changes for civil servants and private-sector workers, handing President Jair Bolsonaro his first major legislative victory. He proposed the constitutional amendment in February and, after some watering down, Congress’ lower house gave its approval in August.

The most meaningful change sets a minimum retirement age of 65 for men and 62 for women. That’s up from averages of 56 and 53, according to the Organization for Economic Co-operation and Development, a club of nations whose populations on average retire at about 66.

The overhaul also introduces progressive brackets for contribution amounts as well as limits for survivor benefits and includes a period for transition to the new system.

The intent is to curb a swelling deficit in Brazil’s “extremely generous” pension system, which accounts for some 40 per cent of total federal spending, according to a note Tuesday from the research firm Capital Economics.

That load has grown along with life expectancy, and increasingly limits the government’s ability to direct funds toward other areas. Brazil will save about $190 billion over the next decade as a result of the overhaul, said Monica de Bolle, senior fellow at the Peterson Institute for International Economics.

“It’s good enough to put Brazil on a more sound fiscal path going forward into the medium term, and does address immediate population aging problems and so on,” De Bolle said in a phone interview.

The reform means Daniel Aragão, a 38-year-old who works in human resources for the federal government in Rio de Janeiro, will have to labour an extra five years before he can retire. He accepts that sacrifice, despite what he perceives as some of the overhaul’s shortcomings.

“I can understand that reform is needed, or else the system will soon collapse,” Aragão said.

Such awareness has been constructed over the course of years and reflects a shift in public opinion. Of people surveyed in July by pollster Datafolha, 47 per cent supported the proposal. A reform submitted by Bolsonaro’s predecessor, Michel Temer, was less ambitious but got significantly less support. President Luiz Inacio Lula da Silva achieved only a partial reform after President Fernando Henrique Cardoso failed to make any changes.

The initial proposal of Bolsonaro’s far-right administration was more aggressive and aimed at saving more than $300 billion over 10 years. Congress removed some items, including a reduction of small benefits for elderly and disabled people with low incomes.

On the central artery of Sao Paulo, Brazil’s biggest city, 48-year-old Anibal Soares said he paid less attention to debate of the plan than he should have.

“I heard that after this reform I’ll have to work six more years to get the same pension. Six more years paying social security, for what?” said Soares, a salesman of farm products. “I’m not saying there shouldn’t be a reform, but I have the feeling it will be people like me paying for it.”

Tuesday’s vote was a win for Bolsonaro after several defeats in Congress. His administration reportedly plans to submit a follow-up proposal with more controversial changes to the pension system and will include states and municipalities. The lower house is evaluating a separate bill that would modify pensions of the military and police.

Several senators who voted for the overhaul said more will be needed.

“In a few years we will be debating another reform because this one was not enough. Whoever is the next president, he or she will have to deal with this debate,” said Sen. Alvaro Dias of the centre-right Podemos party.