The Italian anti-establishment Five Star Movement and the centre-left opposition Democratic Party agreed on Wednesday to form a new government, averting a political crisis and an election that could favour Matteo Salvini’s far-right League. The two parties, despite being political enemies, entered coalition talks to stave off the threat of the second national elections in less than two years. The former ruling alliance of Five Star and League collapsed after months of infighting, with the Prime Minister Guiseppe Conte resigning in a surprise move last week. Mr Conte’s decision came after Mr Salvini, leader of the nationalist League and then deputy prime minister, tabled a no-confidence motion against him. But his plan backfired when he was sidelined from the ruling alliance after a day of tense talks on Wednesday. Mr Conte will return to his position as the country’s leader in the new coalition. The two ruling parties still have to agree on a team of ministers and a shared policy platform, but Five Star chief, Luigi Di Maio, and Democratic Party leader, Nicola Zingaretti, pledged to find common ground for the good of the country. “We love Italy and we consider it worthwhile to try this experience,” Mr Zingaretti said. Mr Di Maio said: “We made commitments to the Italians and, come what may, we want to fulfil them.” Although the two parties have policy differences, a new administration led by Mr Conte, an academic considered close to Five Star, has quelled economic uncertainty. Markets believe the government will make Italy fiscally prudent and less likely to try to break away from the EU. League is extremely Eurosceptic and takes a hard-line stance on immigration, which increased Mr Salvini’s popularity in polls. When he was interior minister in the previous government, he passed a law giving him power to stop ships carrying rescued migrants entering Italian waters. Rescue boats that enter Italian jurisdiction without permission could be fined €1 million (Dh4.2m) under the new legislation.