An Taoiseach and Leader of Fine Gael, Leo Varadkar, arrives at Fine Gael HQ on 5 Oct. 2017, in Dublin, Ireland.

The Irish government was on the verge of collapse on Thursday after the party whose votes Prime Minister Leo Varadkar depends on to pass legislation said it would move to remove the deputy prime minister in a breach of their cooperation agreement.

The crisis comes weeks ahead of a European Union summit in which the Irish government has an effective veto on whether Britain's talks on leaving the bloc progress as it determines if EU concerns about the future of the Irish border have been met.

The opposition Fianna Fail party said it would put a motion of no confidence in Deputy Prime Minister Frances Fitzgerald on Tuesday over her handling of a legal case involving a police whistleblower.

That would break the three-year "confidence and supply" agreement that allowed Varadkar's Fine Gael party to form a minority government in 2016 with nine independent members of parliament.

A breakdown of the deal, which has worked relatively smoothly up until now, would likely lead to an election in December or January.

Fianna Fail initially indicated it might withdraw its threat of a motion of no confidence if Fitzgerald resigned.

"There are ways and there is time to resolve this issue," Fianna Fail justice spokesman Jim O'Callaghan told a 6 p.m. news bulletin. "I don't think anyone wants a general election."

But Foreign Minister Simon Coveney told state broadcaster in the 9 p.m. bulletin that Fitzgerald would not resign.

"Certainly the government is going to stand by the Tainiste (deputy prime minister)," Coveney said.

"This is ... dangerous politically at a time when the country does not need an election," he said, in an apparent reference to the December EU summit.

Fine Gael members of parliament passed a unanimous motion of support in Fitzgerald at an emergency meeting on Thursday evening.

The Fianna Fail move comes after Fitzgerald admitted she was made aware of an attempt to discredit a police whistleblower in a 2015 email, but failed to act.

The case relates to a whistleblower who alleged widespread misconduct in the force. His treatment by the authorities led in 2014 to the resignations of the then police commissioner and justice minister.