A coalition of Israeli political parties announced on Wednesday night they had agreed to a deal to form a new government, paving the way for the ouster of Israel's longest-serving Prime Minister Benjamin Netanyahu. Yair Lapid, leader of the centrist Yesh Atid party, notified Israeli President Reuven Rivlin that he had managed to cobble together a coalition less than an hour before the midnight deadline. Though Lapid holds the mandate to form the government under the agreement, it is Naftali Bennett — leader of the small right-wing party Yamina and the kingmaker in coalition talks — who is set to become prime minister for the first two years of a four-year term. Lapid will serve as foreign minister until the two men swap roles halfway through the term. In a statement, Lapid said the "government will work to serve all the citizens of Israel including those who aren't members of it, will respect those who oppose it, and do everything in its power to unite all parts of Israeli society." The deal is a seismic event in recent Israeli political history as it could spell the final days of Netanyahu's 12 years in office. The coalition agreement must now pass a vote of confidence in the Knesset, Israel's parliament, before a new government and prime minister are sworn in. The new government consists of a number of parties from across the political spectrum, from the left-wing Meretz to Bennett's right-wing Yamina party. In a historic moment, the small Islamist party United Arab List also decided to join the coalition, the first time an Arab-Israeli party has joined a coalition. The party is unlikely to have a minister in the government but will have negotiated with the coalition on issues important to them. Not much unites the parties other than their desire to oust Netanyahu, and the parties differ in their stances on some of the country's most pressing issues, especially relations with the Palestinians. Bennett is the son of American immigrants and a former elite commando in the Israeli military who made millions in the Israeli tech industry. He previously served as defense, economy and education minister under Netanyahu, but is politically even more right-wing than the longtime Israeli leader on certain issues, especially pertaining to relations with Palestinians. But he's more moderate when it comes to social issues such as LGBTQ rights. Bennett once led a West Bank settler organization and has previously said he did not believe in a two-state solution that would establish a state for Palestinians in the West Bank and Gaza. — CNN