Urgent talks are being held in the hope of averting a leadership showdown between Jacinta Allan and her deputy, Ben Carroll, that could plunge Victoria’s Labor government into weeks of political turmoil.The premier and Carroll have publicly declared they would stand in a leadership ballot – expected to be held when caucus meets for the first time since the winter break on Tuesday.This is despite Allan being told by a cross-factional delegation of ministers and factional leaders on Monday that she did not have the support of the majority of caucus and being urged to step down.Sign up for the Breaking News Australia emailIf no compromise is reached, the contest could trigger up to six weeks of instability.Here’s what we know about how the leadership ballot would work and what could happen next.How can a new leader be elected?After the instability of the Rudd-Gillard-Rudd era, a new process for electing leaders was implemented by the federal Labor party to put the decision in the hands of grassroots party members. Anthony Albanese and Bill Shortenwere the first to go through the new system in 2013.The process for the Victoria Labor party is very similar, with a couple of key differences.A petition for a leadership spill in the Labor party in Victoria requires the backing of 50% of the caucus. Federal Labor requires 60%.If that petition is successful and only one person stands for the leadership after the spill, there is no ballot and that person is automatically affirmed as the leader.However, if more than one person stands for the leadership, it triggers an election process in which both the parliamentary caucus and rank-and-file Labor members will vote. The process could take a full six weeks to complete.Nominations would open within 24 hours and close three days later, though caucus can vary the nomination period if more than 80% of MPs agree.Candidates for the leadership would need the support of at least 20% of the caucus.How long will that take?After nominations close, the voting period for will be open for 28 working days.The results of the ballots from the caucus and the rank-and-file membership will be weighted at 50% for each section, and added together to determine the winner of the contest.Who will run the state in the meantime?Ordinarily, during the election process, the acting leader would be the deputy leader. However, when the deputy leader is also a candidate – as in this case – the party must elect an interim leader who cannot also be a candidate.Given Labor is in government and just four months away from an election, this is a situation many in the party are hoping to avoid.Could Allan step aside?So far, she has refused to.On Monday morning, before meeting with the delegation, the premier wrote to Labor secretary, Steve Staikos, asking the party to prepare for a contested leadership ballot.“I refer to media speculation regarding the leadership of the Victorian Parliamentary Labor Party and am writing to request that you ensure that the Victorian Labor Party is prepared to conduct an election for the leadership of the State Parliamentary Labor Party in the event an election is required,” Allan wrote.“I would also like to formally notify you of my intention to be a candidate for the leadership of the Victorian Parliamentary Labor Party in the event that an election is required.”The Victorian Labor party would not comment on the matter “at this time”.