Sydney: Australian Prime Minister Malcolm Turnbull clinched a legislative victory as his government’s A$23.5 billion ($17.7 billion) schools’ funding package passed parliament.

The Australian Education Amendment Bill boosts financing for public and private schools over the next decade and delivers on a key pledge from last month’s budget. It’s also aimed at neutralising attacks by the main opposition Labor party, which has criticised the government’s education policies.

“This is a very historic achievement, this is real reform,” Turnbull said in a radio interview after the legislation passed in the early hours of Friday morning in a marathon sitting of parliament. “For years we’ve had school funding that’s been inconsistent.”

Turnbull’s legislative agenda has hit road blocks since he won last July’s election with a razor-thin majority, forcing the government to negotiate with a disparate group of populist lawmakers in the upper house Senate to pass laws. The bill only passed after the government agreed to add an extra A$4.9 billion to the A$18.6 billion package it originally offered.

The government secured passage of other key legislation on Monday that will see the nation’s five biggest banks slugged with A$6.2 billion of new levies over the next four years. Still, a bid to overhaul laws restricting media ownership remains in limbo in the Senate.

Turnbull, whose Liberal-National coalition has trailed Labor in opinion polls for months, sought to use last month’s budget as a catalyst to turn around its fortunes. So far, it has failed to pay dividends. According to a Newspoll published in The Australian newspaper on June 19, Labor leads the coalition 53 per cent to 47 per cent on a two-party preferred basis.

The government says the education package will deliver a needs-based approach to funding, providing students with equal resources regardless of where they live or whether they attend a public or private school. It was devised by former Future Fund chairman David Gonski, who was commissioned by the then Labor government in 2010 to provide a funding model for schools.

The package hasn’t silenced the opposition’s attacks, with Labor leader Bill Shorten saying it actually cuts A$22 billion in funding to schools over a decade compared with the previous Gonski plan. The Catholic schools sector has also complained its funding will be cut.

Turnbull defended supplying the extra funding that upper house cross-benchers demanded, saying it was needed to get the legislation through.

“I have to work with the parliament that the Australian people elected and sometimes we have to reach compromises,” he said in Friday’s radio interview. “The alternative is you don’t get anything done.”