The collapse in talks over a government reshuffle in warsaw last week has raised the prospect of early elections and laid bare a power struggle at the heart of the ruling coalition over the long-term leadership of the polish right.

Zbigniew ziobro, the hardline justice minister,ignited the political crisiswhen his united poland party announced it would oppose an animal rights bill championed by law and justice (pis), the senior coalition partner.

It was the culmination of months of ideological confrontation within the ruling camp, as mr ziobro and his allies stakedout hardline positions on issues ranging from lgbt rights to climate policy and foreign funding for ngos.

The rightwing united right coalition has governed poland since 2015; it is dominated by pis but relies on mps from unitedpoland and the agreement party of former government minister jaroslaw gowin for its parliamentary majority.

Observers say tensions in the government, which was re-elected last year, have been building for months as mr ziobro positions himself as heir to jaroslaw kaczynski, the 71-year-old pis leader who has dominated the polish right for decades but is understood to be considering a withdrawal from frontline politics.

If it wasnt over the animal rights bill, then it would almost certainly have been over something else, said wojciech szacki of polityka insight, a consultancy. kaczynski wants to retire, but he needs to deal with the ziobro issue first.

In july, mr ziobro announced a plan to withdraw poland from the istanbul convention on the prevention of violence against women, which he has described as a feminist invention that is meant to justify gay ideology. his allies have criticised prime minister mateusz morawiecki, a relatively moderate widely seen as mr kaczynski's preferred successor, for what theyregard as excessive compromise and ideological timidity.

Mr ziobro is presenting himself as the guarantor of the coalitions true rightwing credentials, said ludwik dorn, a former interior minister and once a close ally of mr kaczynski who has served in government alongside mr ziobro. he and his people are afraid that mr kaczynski could limit the number of places they get on the coalitions electoral list. he is fighting for his kingdom.

Mr ziobro is seen as a ruthless political operator. between 2005 and 2007 he served as justice minister and prosecutor-general in a pis-led administration, gainingfame for his frequent press conferences announcing probes into a dazzling array of targets. seen by his admirers as an uncompromising fighter against crime and corruption, critics claim his political opponents had a habit ofgetting caught up in his investigations.

There are people even within the united right who consider him as someone who would do anything to destroy his enemies, said mr szacki. he has such a detailed knowledge of every investigation, of the affairs of so many different people. it is not just liberal poles who are scared of him many on theright are scared of him too.

In 2011 mr ziobro was thrown out of law and justice, then in opposition, after publicly questioning mr kaczynskis leadership. a period in the political wilderness followed, during which he established unitedpoland, a hardline faction with ties to the far-right.

But as mr kaczynski sought to unite polands rightwing political groupings ahead of the 2015 elections, he brought mr ziobro back into the fold. when the united right swept to victory, mr ziobro was restored to the justice ministry.

He went from mount olympus to political hell, followed by a period of limbo and a spectacular return, said malgorzata szuleka of the warsaw-based helsinki foundation for human rights.

Since then, mr ziobro has assumed control over almost every aspect of the polish justice system, with his allies dominating the ministry and holding key posts across the judiciary.

A shrewd bureaucrat, in 2016 he amended a law regulating public disclosure of pending criminal investigations to allow prosecutors but not defendants to disclose sensitive information to third parties.

This means that through his subordinates ziobro can not only launch an investigation into anyone he likes, but can also shape the public narrative concerning anyone who is under investigation, said ms szuleka. thats what makes him so powerful, and why so many people are afraid of him.

Now, with pis leaders raising the prospect of a minority government or early elections and mr ziobros position in the government being called into question, his immediate political future and that of the present configuration of polish politics hangs in the balance.

Opinion polls suggest the electoral prospects of piss coalition partners are not good if they go it alone. a survey on friday for ibris suggested united poland would win just 1.5 per cent of the vote in a snap election, with mr gowins agreement party polling at 1.2 per cent and pis at 35 per cent. there is a threshold of 5 per cent for single parties to enter the polish parliament.but mr kaczynski still bears the scars of the bitter power struggle between pis and its then coalition partners that led to the collapse of the first pis administration of 2005-07, paving the way for eight years of rule by the centre-right civic platform party led by mr kaczynskis nemesis, former european council president donald tusk.

According to reports in the polish press, the justice minister has been putting pressure on mr kaczynski to consent to a merger between their parties, and pave the way for mr ziobro and his allies to assume control of law and justice after mr kaczynskis departure. but mr kaczynski,keen to secure mr morawieckis future elevation to the leadership, is resisting.

Were mr ziobro to be excluded from the ruling camp, an empowered mr morawiecki could be in a position to seal an alliance with centrist factions, leaving mr ziobro to decide whether to seek a reconciliation or to try to outflank law and justice by forging an alliance with the far-right.

He is negotiating [with mr kaczynski] as follows: you want to marginalise me? make a puppet out of me? go, on, try, but i have a suicide belt and if you do it, i will not hesitate to push the button,said mr dorn. [he is saying] i will die, but you will die too.