Israeli Prime Minister Benjamin Netanyahu greets supporters at the party's election headquarters In Tel Aviv.

Israeli Prime Minister Benjamin Netanyahu greets supporters at the party’s election headquarters In Tel Aviv.

Israeli Prime Minister Benjamin Netanyahu will be asked to form the next government after his Likud party scooped 30 seats in a surprise victory, after polls had him trailing the centre-left Zionist Union.

The incumbent fought off a strong challenge from the country’s opposition leader in parliamentary elections on Tuesday, emerging from an acrimonious campaign in a slightly better position to form Israel‘s next government.

Netanyahu will now contact right-wing parties such as Avigdor Lieberman’s Yisrael Beitenu, Naftali Bennett’s Habayit Hayehudi and Moshe Kahlon’s Kulanu, as well as welcoming back one of the ultra-Orthodox parties after a spell on the sidelines.

The prime minister has said he wants to form a government “without delay”. Analysts say the election results mean this could take as little as 2-3 weeks.

The election was widely seen as a referendum on Mr Netanyahu, who has governed the country for the past six years, and recent opinion polls had given his rival, Isaac Herzog of the Zionist Union, a slight lead. As the results were announced on the nation’s three major TV stations, celebrations erupted at Likud’s campaign headquarters in Tel Aviv.

In a statement released on Twitter, Mr Netanyahu said that “against all odds” Likud had won a “great victory.”

“This is a great victory. It’s almost a miracle,” Likud politician Ofir Akunis told The Associated Press.

“For months, everybody attacked the Likud. And today is a beautiful day for the Likud. It sends a message that the people of Israel will decide for themselves.”

Mr Netanyahu’s return to power would likely spell trouble for Mideast peace efforts and could further escalate tensions with the United States.

Mr Netanyahu, who already has a testy relationship with President Barack Obama, took a sharp turn to the right in the final days of the campaign, staking out a series of hardline positions that will put him at odds with the international community.

In a dramatic policy reversal, he said he now opposes the creation of a Palestinian state – a key policy goal of the White House and the international community. The Palestinians, fed up after years of deadlock with him, are now likely to press ahead with their attempts to press war crimes charges against Israel in the International Criminal Court.

“We call upon the international community to support our efforts to join the international treaties and our effort in the ICC,” said Saeb Erekat, a top Palestinian official.

“What Netanyahu is doing and stating are war crimes and if the international community wants peace it should make Netanyahu accountable for his acts,” Mr Erekat said. He said the Palestinian leadership will meet on Thursday to discuss its next steps.

Official results from Tuesday’s election won’t be known for several days.

Two exit polls on Israeli TV showed the parties deadlocked with 27 seats each, and a third gave Likud a slight lead of 28-27. That breakdown could change as final results pour in.

Under Israel‘s fragmented electoral system, either Mr Netanyahu or Mr Herzog will have to court potential partners to secure a 61-seat majority in the 120-seat parliament.

The results indicated that mr Netanyahu will have an easier time cobbling together a majority coalition with hardline and religious allies.

But he will still need the support of Moshe Kahlon, whose new Kulanu party captured nine or 10 seats and would provide the needed margin to either side to control a majority.

Mr Herzog could potentially try to build a coalition that would rely on support from a new Arab alliance that captured 12 to 13 seats. But Arab parties have never sat in an Israeli coalition before, complicating any potential deal.

Stav Shaffir, a leader of the Zionist Union, called the results a “clear vote of no confidence in Netanyahu”.

She said the Zionist Union would wait for the official results before declaring victory or defeat, but claimed Netanyahu’s opponents “have a majority”.