Brazil's President Michel Temer reacts during a ceremony at the Planalto Palace in Brasilia, Brazil April 12, 2017. Picture taken April 12, 2017. REUTERS/Ueslei Marcelino

BRASILIA (Reuters) - Brazil’s lower house of Congress on Tuesday approved the main text of a bill granting debt relief to cash-strapped states that adopt belt-tightening measures, in a victory for President Michel Temer’s austerity program.

In a late night vote of 301 to 127, lawmakers approved the bill that allows states to ask for a three-year suspension of their debt with the federal government if they freeze wages, increase pension contributions and sell assets.

Votes on proposed amendments to the bill were scheduled for Wednesday.

Late last year, the lower house surprised Temer by scrapping those austerity requirements, forcing him to reintroduce the legislation that still needs to clear the Senate.

The bill is key for highly indebted states such as Rio de Janeiro, which has suffered from falling oil prices and is now struggling to pay doctors, teachers and police.

The legislation also reduces debt payments and extends the maturity on 427 billion reais ($137 billion) of debt owed by all of Brazil’s 27 states.