Israeli Prime Minister Benjamin Netanyahu clinched a deal to form a new coalition government just hours before a midnight deadline approached. (Reuters)

As a midnight deadline loomed, Prime Minister Benjamin Netanyahu announced late Wednesday that he had cobbled together a new coalition government, which will be more right-wing and more religious than the last.

After his decisive victory in March, Netanyahu has spent the last 42 days trying to form his fourth government. Late Wednesday, he informed President Reuven Rivlin that he had finally succeeded.

The new coalition government will be composed of five parties that represent the slimmest majority, 61 seats in the 120-member Israeli parliament.

The government will back Netanyahu’s position that the accord pushed by the Obama administration to restrain Iran’s nuclear ambitions is “a bad deal.”

The coalition, too, is composed of members unlikely to press for resumption of peace talks with the Palestinians, talks that consumed U.S. Secretary of State John F. Kerry for nine months last year until they collapsed in a round of bitter recriminations.

“This is not the government that will be able to bridge the gap between Israel and America and Europe,” said Reuven Hazan, a top political scientist at the Hebrew University of Jerusalem.

“They will also be unified in their stand that they don’t trust the Palestinians and don’t want to make concessions to them,” he said.

In addition to Netanyahu’s Likud, the new government will include two parties that represent ultra-Orthodox Jews; a new party built by a former Likudnik who is committed to making housing in Israel more plentiful and affordable; and a religious Zionist party headed by Naftali Bennett, who opposed an independent Palestinian state and supports the growth of Jewish settlements in the West Bank.

Bennett had been the last holdout during the long and complex negotiations to form a new coalition. He appeared alongside Netanyahu at a news conference Wednesday night when the two announced they had finally struck a deal, the details to be worked out in coming days.

Bennett’s party will run the education and justice ministries, in addition to chairing parliament’s constitutional committee, giving Bennett considerable sway over Israel’s judiciary. Bennett and his allies have argued that Israel’s judges, especially the Supreme Court, have too much power and need to be reined in.

Some pundits in Israel say that Netanyahu’s 61-seat coalition won’t last — that any renegade within the government will be able to bring it down.

“In a coalition of only 61 Members of the Knesset, Netanyahu is doomed to twist in the wind, beholden to the whims and caprices of each and every parliamentary joker,” wrote the political columnist Chemi Shalev in the Israeli newspaper Haaretz.

Netanyahu on Wednesday night said, “61 is a good number,” but he suggested that going forward he might try to bring in new members to bolster his coalition.

Earlier this week it appeared that Netanyahu was going to head a coalition with 67 seats in parliament — until his foreign minister and past coalition partner Avigdor Lieberman abruptly resigned and took his seats with him. Lieberman heads a party dominated by Russian immigrants to Israel. He complained that the new government being formed by Netanyahu would be a coalition of “opportunism and conformism.” He did not fully explain what he meant by that.

The inclusion of two parties dedicated to the rights and welfare of Israel’s ultra-Orthodox Jewish population make it likely that the new government will roll back previous attempts to force them to serve in the military and to enter the workforce. Many of its male members prefer to study the Torah instead.