JERUSALEM — Prime Minister Benjamin Netanyahu and his hard-line allies fared far worse than expected in a parliamentary election Tuesday, preliminary results showed, likely forcing him to reach across the aisle to court a popular political newcomer to cobble together a new coalition.

While Netanyahu appeared positioned to serve a third term as prime minister, the results marked a major setback for his policies and could force him to make new concessions to restart long-stalled peace talks with the Palestinians.

His most likely partner was Yesh Atid, or There is a Future, a party headed by political newcomer Yair Lapid that showed surprising strength. Lapid has said he would only join a government committed to sweeping economic changes and a resumption of peace talks with the Palestinians.

Addressing his supporters early Wednesday, Netanyahu vowed to form as broad a coalition as possible. He said the next government would be built on principles that include reforming the contentious system of granting draft exemptions to ultra-Orthodox Jewish men and the pursuit of a “genuine peace” with the Palestinians. He did not elaborate, but the message seemed aimed at Lapid.

Shortly after the results were announced, Netanyahu called Lapid and offered to work together. “We have the opportunity to do great things together,” Netanyahu was quoted as saying by Likud officials.

According to preliminary results, Netanyahu’s Likud-Yisrael Beitenu alliance was set to capture about 31 of the 120 seats, significantly fewer than the 42 it held in the outgoing parliament and below the forecasts of recent polls.

With his traditional allies of nationalist and religious parties, Netanyahu could put together a shaky majority of 61 seats, initial results showed. But it would be virtually impossible to keep such a narrow coalition intact, though it was possible he could take an additional seat or two as numbers trickled in throughout the night.

The results capped a lackluster campaign in which peacemaking with the Palestinians, traditionally the dominant issue in Israeli politics, was pushed aside. Netanyahu portrayed himself as the only candidate capable of leading Israel at a turbulent time, while the fragmented opposition targeted him on domestic economic issues.

Netanyahu’s goal of a broader coalition will force him to make some difficult decisions. Concessions to Lapid, for instance, will alienate his religious allies. In an interview last week with The Associated Press, Lapid said he would not be a “fig leaf” for a hard-line, extremist agenda.