JERUSALEM — Israel’s weakened Prime Minister Benjamin Netanyahu saw his offer on Thursday of a coalition with his strongest political rival swiftly rebuffed after failing to secure a governing majority in a tight election.

Netanyahu’s surprise move was an abrupt change of strategy for the right-wing leader. Benny Gantz’s rejection of this offer could spell weeks of wrangling after Tuesday’s election, which followed an inconclusive national ballot in April.

Gantz’s centrist Blue and White party emerged from the second round of voting this year slightly ahead of Netanyahu’s Likud but lacking the numbers in the 120-member parliament to form a ruling bloc.

Netanyahu, Israel’s longest-serving leader, said in a video clip in which he urged Gantz, the country’s former military chief, to meet him “as soon as today,” that he had pledged during the election campaign to form a right-wing, Likud-led government.

“But to my regret, the election results show that this is impossible,” Netanyahu said. “Benny, we must set up a broad unity government, as soon as today. The nation expects us, both of us, to demonstrate responsibility and that we pursue cooperation.”

Responding to Netanyahu’s call, Gantz made no mention of the prime minister and said he himself would head a “liberal” coalition, political shorthand for one that excludes the Israeli leader’s long-time ultra-Orthodox allies.

Gantz said Israelis were eager for a unity government to end the political uncertainty.

But he then left it to Moshe Yaalon, a fellow Blue and White leader, to deliver a stinging rejection of a partnership with Netanyahu, citing looming corruption charges against the prime minister, who has denied any wrongdoing.

“We will not enter a coalition led by Netanyahu,” Yaalon said, echoing a position Gantz had taken throughout the election campaign and appearing to suggest that an alliance with Likud would be possible if it dumped its veteran chief.

“The time has come for you to tell Netanyahu, ‘Thank you for all you’ve done’,” Yaalon urged Likud members — who have shown no sign so far of rebellion.

Netanyahu said he was “surprised and disappointed” and reiterated his call to Gantz to join him.

“It’s what the public expects of us,” Netanyahu said about a broad government.

The campaigns run by Netanyahu, 69, and Gantz, 60, pointed to only narrow differences on many important issues, and an end to the Netanyahu era would be unlikely to bring about significant changes in policy on relations with the United States, the regional struggle against Iran or the Palestinian conflict.