Forced to rely on the support of two fast-rising rivals in his new governing coalition, Prime Minister Benjamin Netanyahu now faces a reshaped and rocky landscape that could spell trouble ahead: An unwanted culture war with the country's ultra-Orthodox minority as well as pressure to make peace overtures to the Palestinians.

JERUSALEM — Forced to rely on the support of two fast-rising rivals in his new governing coalition, Prime Minister Benjamin Netanyahu now faces a reshaped and rocky landscape that could spell trouble ahead: An unwanted culture war with the country's ultra-Orthodox minority as well as pressure to make peace overtures to the Palestinians.

After weeks of difficult negotiations, Netanyahu, who barely hung onto his job, was forced to cede significant power to his new partners, liberal former TV anchorman Yair Lapid and his unlikely ally, pro-settlement hard-liner Naftali Bennett.

Both men make no secret that they want to be prime minister one day, and each can bring down the government at will.

This new constellation is expected to force the cautious Netanyahu, who presided over a broad and stable coalition during his previous four-year term, to confront some of the nation's most contentious issues.

Both Lapid and Bennett have vowed to end years of preferential treatment for the country's small but politically powerful ultra-Orthodox minority. Lapid and the junior partner in the coalition, former Foreign Minister Tzipi Livni, will also put heavy pressure on Netanyahu to take a softer line toward the Palestinians. With President Barack Obama visiting next week, Netanyahu could be forced sooner than later to make difficult decisions about the Palestinians.

"The next term will be one of the most challenging in the history of the state," Netanyahu said Thursday. "We are facing great security and diplomatic challenges."

The ultra-Orthodox minority makes up roughly 8 percent of the country's 8 million people. Because of Israel's coalition system, their political parties have traditionally wielded power far beyond their numbers by guaranteeing a string of prime ministers a parliamentary majority.

Ultra-Orthodox political parties have used their kingmaker status to secure vast budgets for their religious schools and seminaries and to win automatic exemptions from compulsory military service for tens of thousands of young men to pursue religious studies. Older men collect welfare stipends while continuing to study full time.

The system has led to high rates of unemployment in the ultra-Orthodox community, and has bred widespread resentment among the general public. Attempts by ultra-Orthodox activists to impose their customs on broader society, such as pushing for gender-segregated buses, have further angered the public.

Both Lapid and Bennett tapped into this resentment to make great gains in the Jan. 22 election, promising to bring a "sharing of the burden" of military service and paying taxes. Lapid's Yesh Atid Party, running in its first election, emerged as the second-largest faction in parliament, with 19 of 120 seats. Bennett's rejuvenated Jewish Home captured 12 seats.

Netanyahu's Likud-Yisrael Beitenu bloc won 31 seats. Although it's the largest single faction, it is well below its 42-seat level in the previous parliament and far short of the 61 seats needed for a majority. With Lapid, Bennett and Livni's dovish "Movement" on board, Netanyahu controls a 68-seat majority.

Tough negotiations lasted nearly six weeks before it was finalized Friday, just a day ahead of a deadline that could have triggered new elections.

"Indeed, the new government is not what its leader had hoped for. He did everything he could to flee it, as if from a place plagued by boils, locusts, lice and pestilence. These were not the partners he had hoped for: He did his utmost to keep them out of the coalition, and they taught him a thing or two," wrote Yossi Verter in the liberal Haaretz daily.

"He is the Old Guard, they are the new. He, poor guy, will soon be history," he wrote.