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

The crisis comes three 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.

In a row that escalated rapidly, the opposition Fianna Fail party said it would put a motion of no confidence in Deputy Prime Minister Frances Fitzgerald before parliament 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 18 months ago.

Fianna Fail initially indicated it might withdraw its threat if Fitzgerald resigned, but Fine Gael members of parliament passed a unanimous motion of support in Fitzgerald at an emergency meeting Thursday evening.

​Election likely

Asked after Fine Gael’s statement whether the country was headed for an election, a senior Fianna Fail source replied: “Straight towards one.”

The source declined to be named as the party’s frontbench was to hold an emergency meeting early Friday to decide its next move.

“This is … dangerous politically at a time when the country does not need an election,” Foreign Minister Simon Coveney of Fine Gael told national Irish broadcaster RTE, in an apparent reference to the Brexit talks he had earlier described as a “historic moment” for the island of Ireland.

Border and Brexit

The border between Ireland and Northern Ireland, which will be the UK’s only land frontier with the bloc after its departure, is one of three issues Brussels wants broadly solved before it decides next month on whether to move the talks onto a second phase about trade, as Britain wants.

Coveney told parliament Thursday that the government was not yet ready to allow the talks to move on to the trade issues at the Dec. 14-15 summit and needed more clarity from London.

A breakdown of the government’s cooperation deal, which has worked relatively smoothly up until now between two parties that differ little on policy but have been bitter foes for decades, would likely lead to an election in December or January.

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. Fine Gael say she adhered to due process.

Since Varadkar’s appointment as Fine Gael leader in May, his party has narrowly led Fianna Fail in opinion polls that suggest both parties would increase their support but still struggle to form anything but another minority government.