BRASILIA - Brazil's government reached a deal with lawmakers on Tuesday paving the way for a congressional committee to vote on its key pension reform bill later in the day, boosting investor sentiment and lifting local financial markets.

The benchmark Bovespa stock market index rose 1.8 per cent to above 96,000 points, its best day in three weeks, while the real recovered most of its losses after it had earlier slid to a four-week low of 3.96 per dollar.

President Jair Bolsonaro's government made several minor changes to the bill late on Monday, local newspapers reported, to ensure that the Constitutional and Legal Affairs Committee (CCJ) went ahead with the delayed vote on its constitutionality.

Major Vitor Hugo, the government's leader in the lower house, confirmed that the CCJ will vote later on Tuesday, while committee member Marcelo Freitas said there had been no dilution of the bill's targeted savings of just over 1 trillion reais ($255 billion) over the next decade.

'This is great news,' said Jason Vieira, chief economist at Infinity Asset Management in Sao Paulo, adding that the deal was a sign of easing political tensions.

The government, economists and investors say pension reform is essential to get Brazil's fiscal deficit under control, make it an attractive investment destination and accelerate what has been an anemic recovery from the 2015-16 recession.

Underscoring the importance of social security reform, the Economy Ministry on Tuesday published figures that showed Brazil's public sector structural deficit widened to 0.7 percent of gross domestic product in 2018 from 0.5 percent the year before.

Brazil's spending on social security is among the highest in the world, and a radical overhaul was a key proposal of Bolsonaro's election campaign. But the government has lost momentum on the pension legislation recently, and economic data suggests the economy is flagging, perhaps even shrinking.

Securing the CCJ vote, which is set to take place some time after 2:30 p.m. local time (1730 GMT), will be welcome relief for the government and markets alike.

'The government needs wins, and better communication skills,' said one portfolio manager in Sao Paulo. 'There will always be noise, as media and establishment opposition is fierce. But at least the government must stop shooting itself in the foot.'