The swearing-in of a new Israeli government finally brings down the curtain on the 12-year leadership of Benjamin Netanyahu. He bows out as Israeli’s longest serving prime minister and still the country’s most popular politician. But he fostered a poisonous political atmosphere that characterised the latter years of his rule, ultimately causing his downfall. What united the eight disparate parties in the coalition sworn in on Sunday was their desire to see Netanyahu’s back. It now falls to this government, headed for the first two years by Naftali Bennett, to heal the country’s wounds.

A masterful tactician, Netanyahu oversaw relative stability and economic prosperity. But his legacy is sullied by bombastic, illiberal behaviour. For years, he stoked tensions with Israel’s minority Arab community, passing legislation that institutionalised discrimination and baiting Palestinians with Israeli citizenship on the campaign trail. Following a decade of ever more creeping colonisation in the West Bank, a resolution to the Israeli-Palestinian crisis has rarely looked so remote.

Netanyahu put his survival above all else, embracing rightwing extremist groups whose members include open homophobes and racists, as Israelis were dragged through four elections in two years. Amid the political malaise, his governments did not approve a budget after 2018. After being charged with corruption and fraud, he launched tirades against the judiciary. Traditionally liberal institutions have come under pressure from rightwing groups he courted.

His successor is an ultranationalist who is more rightwing than Netanyahu. Bennett was previously forced to deny he boasted of killing “lots of Arabs’‘ and has made no secret of his desire to annex the occupied territory of the West Bank. But if the fragile coalition manages to hold together, there should be checks on his extreme views.

Yair Lapid, Bennett’s centrist coalition partner, surprised many with his ability to knit together a government, which also includes leftist parties long in the wilderness. He is supposed to replace Bennett in 2023. The new government also includes an Arab party for the first time, led by Mansour Abbas.

The eclectic grouping faces an uphill struggle. While an impressive tech sector has created a wealthy bubble around Tel Aviv, the nation is blighted by deep inequalities, with Arabs and ultraorthodox Jews the worst affected. The violence that erupted between Israeli Arabs and Jews across mixed towns as Israel fought an 11-day conflict with Hamas last month shone an ugly spotlight on simmering communal tensions.

Abbas’s party has secured promises from the coalition for $16bn to be allocated to improving infrastructure and security in Arab towns. Bennett and Lapid must ensure these are not hollow pledges.

Coalition leaders will have to put aside political differences and work for the betterment of all Israeli citizens after two years of political paralysis. If the government is successful it could restrain the urge of centrists to veer to the right and go some way to convincing Palestinians with Israeli citizenship that the country’s politics can be more inclusive. If it fails, Israel will be put through the torture of a fifth election and voters’ faith in the country’s politics will be further eroded.

The coalition describes itself as the “Change” government but it must now translate the label into action. Netanyahu will be attempting to undermine the new government. He should instead focus on his corruption trial and allow justice to finally take its course.