PARIS, Dec 4 (Reuters) - French lawmakers passed a no-confidence vote against the government on Wednesday, throwing the European Union's second-biggest economic power deeper into a crisis that threatens its capacity to legislate and tame a massive budget deficit.

Far-right and left-wing lawmakers joined forces to back a no-confidence motion against Prime Minister Michel Barnier, with a majority 331 votes in support of the motion.

Barnier now has to tender his resignation and that of his government to President Emmanuel Macron, making his minority government's three-month tenure the shortest lived in France's Fifth Republic beginning in 1958. He is expected to do so on Thursday morning, French media reported.

The hard left and far right punished Barnier for using special constitutional powers to adopt part of an unpopular budget without a final vote in parliament, where it lacked majority support. The draft budget had sought 60 billion euros ($63.07 billion) in savings in a drive to shrink a gaping deficit.

"This (deficit) reality will not disappear by the magic of a motion of censure," Barnier told lawmakers ahead of the vote, adding the budget deficit would come back to haunt whichever government comes next.

No French government had lost a confidence vote since Georges Pompidou's in 1962. Macron ushered in the crisis by calling a snap election in June that delivered a polarised parliament.

With its president diminished, France now risks ending the year without a stable government or a 2025 budget, although the constitution allows special measures that would avert a U.S.-style government shutdown.

France's political turmoil will further weaken a European Union already reeling from the implosion of Germany's coalition government, and weeks before U.S. President-elect Donald Trump returns to the White House.

The country's outgoing defence minister Sebastien Lecornu warned the turmoil could impact French support for Ukraine.

The hard left France Unbowed (LFI) party demanded Macron's resignation.

Barnier's demise was cheered by far-right chief Marine Le Pen, who has sought for years to portray her National Rally party as a government in waiting.

"I'm not pushing for Macron's resignation," she said. "The pressure on the president will get greater and greater. Only he will make that decision."

Photo from Reuters