Mexico’s finance ministry announced a series of measures to improve national oil company Pemex’s ailing finances, giving $4.2b liquidity boost. As Reuters reported, that includes a capital injection and a credit facility to pay down pension costs this year. The support also includes tax breaks that will allow Pemex to deduct more of its exploration and production costs.

However, government support for Pemex, which last year had a record after-tax loss of $30b, is conditioned to the implementation of an austerity plan to stem wasteful spending and operational inefficiencies. Pemex has committed to cut spending by around $5.7b this year, Nasdaq informed.

Miguel Messmacher, a Deputy Finance Minister, said later on  that the oil company will have less need to further tap credit markets following the liquidity injection.  In addition, the government said the support does not threaten goals to reduce the public deficit this year to 3.5% of gross domestic product, down from 4.1% last year, as the government will receive from the central bank around $13.6b in excess funds that will be used to lower the public debt.

Pemex has historically provided federal coffers with as much as 40% of its revenue, but recently that amount has been halved. But a constitutional energy overhaul passed in 2013 at the start of President Enrique Pena Nieto’s administration ended Pemex’s decades-long monopoly and promised to boost future oil output by luring new private and foreign producers into the country.