JERUSALEM (AP) — Israel’s parliament on Wednesday dissolved after failing to meet a midnight deadline for forming a new government, triggering an an unprecedented third election in a 12-month period while giving scandal-plagued Prime Minister Benjamin Netanyahu a welcome break as he fights to save his political career.

After months of political deadlock following a September election, lawmakers overwhelmingly passed the first of three votes required to dissolve the parliament and set a March 2 date for new elections.

But after a midnight deadline passed, parliament was automatically dissolved. Lawmakers were continuing their debate early Thursday to confirm the official date.

READ MORE: Netanyahu’s annexation plans face opposition, but not from his political rival

A new campaign will prolong a year-long political stalemate that has paralyzed the government and undermined public trust in the government. For the third time in the past year, the country now appears to be heading to what is sure to be a nasty three-month political campaign that according to recent opinion polls is expected to deliver very similar results.

In September’s vote, Netanyahu’s Likud party and the rival Blue and White party both were unable to secure a parliamentary majority. Netanyahu and Blue and White’s leader, former military commander Benny Gantz, both failed during officially mandated periods to cobble together a governing coalition. Then, during a final three-week window that ended Wednesday, they were unable to agree on a power-sharing agreement that would have avoided another vote.

Both men had insisted they want to avoid another costly election campaign. And together, their parties control a solid majority in the 120-seat Knesset.

But neither was willing to compromise on their core demands for a unity government. Netanyahu insisted on serving as prime minister, where he is best positioned to fight his recent indictment on a series of corruption charges. Gantz has refused to serve under a prime minister with such serious legal problems and called on Likud to choose a different leader.

Given the divisions in Israeli society, and the deep mistrust between the opposing camps, there appears to be little hope that another vote will break the loop of elections and instability that has rocked the country for the past year. In the recent campaigns, the candidates have launched deep personal attacks on one another, and Netanyahu has been accused of inciting against the country’s Arab minority.

“Keep your children away from the television,” said Yair Lapid, a senior member of Blue and White, saying the campaign will be a “festival of hate, violence and disgust.”

“What used to be a celebration of democracy has become a moment of shame for this building,” he added. “There are only three reasons for this election — bribery, fraud and breach of trust,” he said, referring to the criminal charges filed against Netanyahu last month.

Netanyahu skipped the vote. But in a video on social media, he accused Gantz of conspiring with Arab leaders and “forcing” new elections. “In order to prevent this happening again, there is only one thing we must do: win and win big,” he said.

The upcoming campaign is expected to cost the economy hundreds of millions of dollars, and a string of caretaker governments has frozen major legislation, key appointments, long-term planning and budgets for the military and important government ministries.

But for Netanyahu, the country’s longest-sever serving leader, a new campaign offers a much-needed lifeline.

Netanyahu was indicted last month on charges of accepting bribes, fraud and breach of trust. He is desperately clinging to power to wage his legal battle from the favorable perch of prime minister. Israeli law does not require a sitting prime minister to resign if charged with a crime.

Netanyahu can now use his office in the coming months as a bully pulpit to continue his attacks on prosecutors and police investigators, whom he has accused of staging an “attempted coup” against him.

Without a functioning parliament in place, Netanyahu can also put on hold his expected request for immunity from prosecution.

The outgoing parliament does not have a majority in favor of granting him immunity. Netanyahu can now hope that the next election delivers him a more favorable result. After the March election, he also could use coalition negotiations as leverage to push potential partners to support his immunity request. Netanyahu’s trial appears to be on hold until the immunity issue is resolved.

Yohanan Plesner, president of the Israel Democracy Institute, a nonpartisan think tank, said that being in the prime minister’s post during these negotiations is a huge advantage. “Because then one can trade politically important Cabinet portfolios and so on in return for support for the immunity,” he said.

Netanyahu’s first immediate challenge will be to fend off an insurrection inside Likud. The party announced Wednesday that it will hold a leadership primary on Dec. 26.

One renegade lawmaker, Gideon Saar, has already said he will challenge Netanyahu, though the prime minister remains popular in the party and appears to have a solid edge.

Netanyahu could also face new legal questions. Although he is currently not required to step down, Israeli law is unclear about whether he could be given the authority to form a new government after the next election. Attorney General Avichai Mandelblit, who was criticized for his slow decision making before he indicted Netanyahu, will now be required to rule on that question as well.

READ MORE: Israel’s ‘do-over’ election poses new threats to Netanyahu

Even if Netanyahu overcomes these challenges, polls indicate that he will not be able to muster a majority in favor of granting him immunity or forming a coalition government.

Maverick politician Avigdor Lieberman, a former Netanyahu ally, has turned into the prime minister’s greatest nemesis.

Lieberman served in a string of Netanyahu governments, but then abruptly resigned as defense minister last December to protest what he thought were weak policies toward Gaza militants.

That resignation pushed the country into its current predicament, setting the stage for inconclusive elections in April and then in September. Though Lieberman shares Netanyahu’s hardline views toward the Palestinians, his secular Yisrael Beitenu party opposes Netanyahu’s close relations with ultra-Orthodox religious parties.

Refusing to endorse either Netanyahu or Gantz, Lieberman has repeatedly called on them to form a broad unity government. If the three leaders continue to refuse to soften their positions, it seems unlikely a new election will break the deadlock.