Yair Lapid, chairman of the Yesh Atid party, formed a coalition government with the help of the small Arab party Ra'am shortly before a midnight deadline, concluding the era of long-time Prime Minister Benjamin Netanyahu.
Lapid informed President Reuven Rivlin that he had succeeded in forming a government on Wednesday.
"I pledge that this government will serve all citizens of Israel," Lapid wrote on Twitter late Wednesday, adding that this applied to "those who voted for it and those who didn't."
He said the new government will "respect its opponents and do everything possible to unite and connect all parts of Israeli society."
The agreement marks the first time an Arab party will become part of Israel's government.
The eight Knesset factions which will form the coalition are Yesh Atid (Future), the centrist Blue and White, the secular Yisrael Beiteinu party, the Labour Party, the ultra-right Yamina (Rightwards) party, right-leaning New Hope, the left-liberal Meretz Party and Ra'am, he said.
The agreement came shortly before Lapid's 28-day mandate to forge a working majority was due to end
Coming more than two months after Israel's latest elections, it followed high-pressure efforts to bring together the eight parties, some of them far apart on the political spectrum.
There were heated disagreements among the coalition partners right up to the last minute, with negotiations continuing until shortly before the deadline.
The new government is expected to be sworn in on June 14, although Lapid also told Rivlin he hoped to bring the government to the approval of the Knesset as soon as possible.
Lapid asked the Knesset speaker to call a special session of the plenary as soon as possible so he could officially inform the parliament.
Lapid, until now opposition leader, needs the support of a simple majority of the 120 lawmakers in the Knesset.
Yamina head Naftali Bennett and Lapid agreed to rotate the role of prime minister, with Bennett taking on the post for the first two years, before he is replaced by Lapid on 27 August 2023.
Lapid would begin in the role of foreign minister.
Lapid's party, in the political centre, was the second strongest force in the March election after Netanyahu's right-wing conservative Likud.
Lapid entered politics after a career as a television host, and served as finance minister in a previous Netanyahu government.
Bennett became a millionaire through an internet start-up.
Netanyahu has led the country since 2009, and had already served as prime minister from 1996 to 1999, making him Israel's longest-serving head of government.
The small parties united under Lapid's Yesh Atid were primarily united by their rejection of Netanyahu, who is the subject of a corruption trial.
Otherwise they have divergent political goals.
Bennett's pro-settler Yamina differs widely from other coalition partners such as Meretz, the Labour Party and Ra'am, which support the establishment of an independent Palestinian state. These differences could complicate the coalition's work.
Labour party leader Merav Michaeli said joining the alliance was a difficult decision. "We still have a long way to go," she said, but added that "tonight we are making a new beginning."
In early May, 56 lawmakers voted that Lapid should form a government, after Netanyahu had previously failed to do so.
The formation follows an extended political crisis, with four elections held in two years, each failing to produce a clear majority.
Israel's parliament also elected Isaac Herzog as the country's new president on Wednesday. The secular politician and former leader of the Labour Party will take on the largely ceremonial role on 9 July.