(Bloomberg) -- Bulgaria’s main political parties agreed to form a joint government, seeking to end three years of political deadlock that hamstrung the nation’s bid to join Europe’s single currency and move forward much-needed judicial reform. 

Former Prime Minister Kiril Petkov’s party will lead a cabinet alongside the conservative party under long-time ex-Premier Boyko Borissov. The political archrivals overcame deep ideological divisions and a last-minute fallout over a wiretapping dispute to produce a coalition to carry through measures that have been stalled by the turmoil. 

“We’re convinced that this step at this moment is useful for Bulgaria,” Nikolai Denkov, who was designated to lead the makeshift coalition for the first stage, told reporters in Sofia on Friday. 

Should the cabinet win a majority, it may end a season of crisis in Bulgaria that witnessed five inconclusive elections in two years, the derailment of the EU member state’s bid to join Europe’s visa-free Schengen travel zone as well as the euro area. Denkov will present a cabinet lineup by Monday before a vote in parliament, where the parties control 132 in the 240-member chamber. 

After nine months, Denkov will hand over the prime minister’s office to Mariya Gabriel of Borissov’s Gerb party, who resigned her European Commission post to join the government, according to the plan. The main parties will safeguard Bulgaria’s “euro-Atlantic orientation,” Gabriel said.

The final stage of talks were overshadowed by upheaval after a leaked wiretap laid bare the designs of Petkov’s party, We Continue the Change, to make appointments and overhaul the security services. The revelation prompted Borissov’s party to quit the talks.  

On Tuesday, the prosecutor’s office announced it would strip Borissov, who governed for more than a decade until 2021, of his parliamentary immunity over a money-laundering investigation. Borissov, who has denied wrongdoing in multiple inquiries, called it an effort to halt the cabinet. 

The parties revived negotiations when resistance to a joint deal began to emerge from other centers of power, particularly from Bulgaria’s president, Rumen Radev. 

Radev, a longtime Borissov rival who has effectively held the reins in Sofia with his appointment of several interim cabinets, was unequivocal in his disapproval. 

“I don’t expect the kiss between Borissov and Petkov to bring anything but disgust,” Radev said Thursday in Moldova on the sidelines of a summit meeting. 

If the agreement wins a majority, Radev would have no leverage to block it. Should the vote to install Denkov fail, Radev must pick a party for a final attempt at forming a government. If that fails, a new election will be scheduled — the sixth in three years. 

©2023 Bloomberg L.P.