JERUSALEM, May 31 (AFP) - Israeli nationalist hardliner Naftali Bennett said on Sunday (May 30) that he would join a potential coalition government that could end the rule of the country's longest-serving leader, Prime Minister Benjamin Netanyahu.

Lawmakers opposed to right-wing Netanyahu have been in intense talks ahead of a Wednesday deadline, as a ceasefire held following the latest deadly military conflict with Hamas in the Gaza Strip.

Netanyahu, 71, who faces trial on fraud, bribery and breach of trust charges, which he denies, has clung to power throughout a period of political turmoil that has seen four inconclusive elections in under two years.

A March vote saw Netanyahu's Likud party gain the most seats, but he again failed to form a government.

Opposition leader and former TV anchor Yair Lapid now has until Wednesday evening to build a rival coalition.

Lapid, 57, is seeking a diverse alliance which the Israeli media has dubbed a bloc for "change", which would include Bennett as well as Arab-Israeli lawmakers.

In his determination to bring down the hawkish prime minister, Lapid has offered to share power and let Bennett, 49, serve the first term in a rotating premiership.

Bennett, after meeting members of his religious-nationalist Yamina party, said on Sunday: "I will do everything to form a national unity government with my friend Yair Lapid."

Lapid and Bennett's parties started talks on Sunday night to formalise the deal, they said in a statement.

Religious-nationalist Yamina won seven seats in Mar 23 elections, but one member has refused to join an anti-Netanyahu coalition.

Netanyahu, who has been in office for 12 consecutive years after an earlier three-year term, in his own televised address minutes later lashed out at the plan, calling it "a danger for the security of Israel".