Benjamin Netanyahu has narrowly won an election in which disgruntled Israelis catapulted a new centrist challenger into second place and he now faces the task of building a coalition.

Tuesday's vote crystallised demands for attention to bread-and-butter issues over the ambitions of religiously fired hardliners and largely sidelined foreign policy issues such as thwarting Iran's nuclear plans and Palestinian aspirations.

The right-wing Prime Minister claimed victory after his Likud Party and its ultra-nationalist Yisrael Beitenu ally took 31 of parliament's 120 seats, according to a near-final tally. That made it the biggest single bloc, despite losing 11 of its previous seats.

Overall, right-wing and religious parties emerged with roughly half the total, an erosion of the dominance Mr Netanyahu had enjoyed during almost four years of deadlock in peacemaking with the Palestinians and jitters over Iran.

Yesh Atid (There is a Future) Party was runner-up with 19 projected seats. It, and the centre-left Labour Party – which came third with 15 seats – tapped into secular middle-class resentment that taxpayers must shoulder the burden of welfare-dependent ultra-Orthodox Jews exempt from military conscription.

Mr Netanyahu, who in two terms as premier has enjoyed core religious backing, quickly made overtures to his opponents by saying he wanted to form as broad a coalition as possible – a process likely to take several weeks.

A senior member of Yesh Atid, led by former television presenter Yair Lapid, said ending exemption from military service was central to the party's platform, as was reviving peace talks.

Palestinians reacted warily to the result, voicing doubts it would produce a government more willing to compromise for peace, even if it included centrist parties. An editorial in the Ramallah-based newspaper al Quds said such parties would provide a "cosmetic decoration" for a Netanyahu-led government that would mislead world opinion without halting a drive to expand Jewish settlement on occupied land.

As he claimed election victory at Likud campaign headquarters, Mr Netanyahu said: "The first challenge was and remains preventing Iran from obtaining nuclear weapons."

He views Tehran's nuclear programme as a threat to Israel's existence and has stoked concern by hinting at possible Israeli military action to thwart it. He has also shunted Palestinian peace talks well down the agenda despite Western pressure to keep the quest for a solution alive.

Now weakened by the verdict of voters, he is almost certain to need centrist partners for a stable coalition and may offer more flexibility toward the Palestinians.

Amram Mitzna, a senior member of former prime minister Tzipi Livni's centrist Hatnua Party, said the election had "arrested the rightward drift of Israeli society" and urged Mr Netanyahu to heed the message delivered by voters and "build as broad a government as possible so that we can bring about real change in Israel".

Naftali Bennett, millionaire son of American immigrants who leads the hard-right, pro-settler Jewish Home Party, remained a likely coalition partner despite making a poorer election showing than opinion polls had predicted.