JERUSALEM (AFP) - Israeli Prime Minister Benjamin Netanyahu on Friday signed agreements with key coalition partners, forming a new government just before a deadline and a milestone visit by US President Barack Obama.

The alliance of Netanyahu’s Likud party and former foreign minister Avigdor Lieberman’s Yisrael Beitenu had been locked in intense negotiations for 40 days with the centrist Yesh Atid and far-right Jewish Home parties, which held the key to building a government with a majority in the 120-seat parliament. “The prime minister welcomes the coalition agreements that have been signed between the Likud and Yisrael Beitenu and the Yesh Atid party and the Jewish Home,” Netanyahu’s office said on Friday afternoon, about an hour before the start of the Jewish Sabbath which ends on Saturday evening. “On Saturday evening, the prime minister will inform President Shimon Peres that he has completed the task” of forming a government, it said. Netanyahu had a legal deadline of Saturday evening to come up with a coalition or admit defeat. He had previously signed with the centrist HaTnuah party of former foreign minister Tzipi Livni, who is to be justice minister and Israel’s negotiator in talks with the Palestinians. With Yesh Atid and Jewish Home on board, the coalition will command a total of 68 parliamentary seats. The new cabinet is expected to be sworn in by parliament on Monday. Netanyahu’s Likud party confirmed Yesh Atid leader Yair Lapid would be finance minister and that his party would also take the education, social services health, and science and technology portfolios.