Jerusalem   -  Israelis eyed the end of an era Thursday after a motley alliance of parties from across the political spectrum agreed to form a government to unseat veteran Prime Minister Benjamin Netanyahu.

Opposition leader Yair Lapid announced the deal just minutes before a midnight (2100 GMT) Wednesday deadline, prompting celebrations into the early hours by the premier’s opponents and a defiant show of support by his fans.

On paper, the prospective coalition commands a slender majority in parliament but a confidence vote is not expected for several days, giving Netanyahu time to woo potential defectors.

With the threat of possible jail time hanging over him in his ongoing trial on corruption charges, the 71-year-old is unlikely to allow his record 12 straight years to end without a messy fight, analysts warned. 

On Thursday, the master political operator was already on Twitter, seeking to play on any last-minute misgivings among right-wing lawmakers about allying with the left against him.

“All lawmakers who were elected with votes from the right must oppose this dangerous left-wing government,” he said.

The new coalition would see the religious nationalist Naftali Bennett serve as prime minister for two years before Lapid, a secular centrist, would take the helm. 

Should last-minute defections scupper the “change” alliance, Israel would likely have to hold yet another election, the fifth in just over two years.