Benjamin Netanyahu's deadline for forming a new Israeli government has expired, with the country's longest-serving prime minister failing to break more than two years of political deadlock.

There was also no guarantee that, after the conservative incumbent was unable to assemble a new coalition, parties outside his caretaker government could bridge their differences and unseat him.

Mr Netanyahu has been in office since 2009 and also served for three years in the 1990s.

The 71-year-old has been fighting to retain power through four inconclusive elections since 2019 and is on trial for criminal corruption charges he denies.

With the midnight deadline having passed, President Reuven Rivlin can assign the coalition-building task to another member of parliament.

That is widely expected to be Yair Lapid, whose centrist Yesh Atid party placed second to Mr Netanyahu's Likud in the 23 March vote.

Mr Netanyahu's bloc of right-wing and Jewish religious parties failed to win a majority, but so did a camp aiming to oust him, which would have to include his right-wing rivals as well as traditional left-wing and centrist opponents.

Both sides have courted the support of parties representing Israel's around 20% Arab minority, potentially giving them say over a cabinet for the first time in decades.

Naftali Bennett, head of the ultranationalist Yamina party, has emerged as a kingmaker.

The 49-year-old has voiced a preference to join Mr Netanyahu but said he would seek a partnership with the prime minister's opponents to avoid a fifth election as Israel reopens its economy following a swift Covid-19 vaccination programme and grapples with the challenges of Iran's nuclear programme.

A rotation deal in which Mr Bennett and Mr Lapid would alternate as prime minister has also been widely mooted.

Much of the impasse stems from Mr Netanyahu's legal troubles.

Some prospective allies have pledged they would not serve under a prime minister who is on trial.

Should a new nominee tapped by President Rivlin fail to put together a coalition within 28 days, he can ask parliament to agree a candidate within three weeks. If it cannot, Israel will hold another election.

"We are 60% headed toward another election and 40% toward a new government," according to Yoav Krakovsky, Kan public radio's political affairs correspondent.