Matteo Renzi looks on during a political meeting in Turin
Fornmer Prime Minister Matteo RenziReuters

The Italian government won a gruelling vote of confidence on its 2019 budget in the upper house in the early hours of Sunday, as it races to get the package approved before a year-end deadline.

The budget has to be approved by the lower house of Parliament by December 31 so it can take effect from the start of the new year.

The government of the anti-establishment 5-Star Movement and the right-wing League won the vote 167-78, with three abstentions.

Last Wednesday, the European Commission reached a deal with Italy over its 2019 budget after months of verbal sparring, avoiding disciplinary steps against Rome.

But the changes led to extensive re-drafting, and on Saturday a final text only arrived in the Senate at the last minute, triggering uproar from opposition lawmakers.

The Democratic Party said it would ask a top Italian court to rule on the constitutionality of the move, claiming there had been no time to debate the law in detail.

"The budget law is a joke," former Prime Minister and PD member Matteo Renzi said on Saturday.

But on Sunday, Deputy Prime Minister Luigi Di Maio said on Facebook that reaching a deal with the EU had inevitably meant more time had been needed to get the measures before parliament.

"I am counting on the budget being finally approved on December 27-28," he said.

The populist ruling coalition unveiled an expansionary budget in October which included a projected deficit of 2.4 percent of the gross domestic product, up from 1.8 percent this year, to help fund welfare and tax reform measures.

In a compromise with Brussels, it then narrowed its deficit forecast for next year to 2.04 percent of GDP while lowering its economic growth outlook to 1.0 percent from 1.5 percent.

On Saturday, Bundesbank President and European Central Bank Governing Council member Jens Weidmann said the compromise weakened Brussels' hand in pressing members of the eurozone to stick to the bloc's fiscal rules.

In Italy, if budgets are not approved by December 31, then automatic provisional financing for the state kicks in.

.