Madagascar's president announced on Monday that a new government had been appointed following a court ruling, which called for a "consensus" administration to resolve a political crisis sparked by electoral reform.The Indian Ocean nation has been rocked by ongoing anti-government protests that began over new laws that the opposition said sought to bar their candidates from taking part in elections scheduled for later this year."The government of (Prime Minister) Christian Ntsay has now been put in place after several rounds of negotiations," President Hery Rajaonarimampianina told reporters at his official residence.The Constitutional Court had ordered Rajaonarimampianina to form a government of national unity with a "consensus prime minister" to avert a full-blown crisis.The president said the appointments "respected" the ruling which required the ministries to be allocated to the country's parties to reflect the composition of parliament after polls in 2013.However, the ruling triggered fierce debate between the government and the opposition over its interpretation.Both sides say they hold the majority in parliament, where many legislators have switched allegiances since 2013.Several key ministries including defence and finance remain in the hands of the president's HVM party, although others including foreign affairs and fishing have gone to opposition figures under the deal.On June 4 he appointed non-partisan technocrat Christian Ntsay, 57, as prime minister as part of an agreement with part of the opposition to obey the court ruling.Ntsay is not a member of any political party and has a reputation as an international expert in labour management and leadership, previously serving as Madagascar's tourism minister between 2002 and 2003. 'Democratic progress' ? "We hope to be able to hold an inclusive election, the results of which will be accepted by all," added Rajaonarimampianina."Speaking to the prime minister and the ministers, I say: The eyes of the nation and the whole world are on you."You should enhance security - you will be judged on this." The large island has a history of chronic instability since the final years of former Marxist military leader Didier Ratsiraka's rule. He was voted out in 2001. Since April 21, hundreds of opposition supporters have occupied the capital Antananarivo's May 13 square, initially to protest the president's proposed electoral reform package.But after those proposals were overturned by the courts, the protests became a full-fledged movement to oust Rajaonarimampianina. Violence has claimed two lives and left more than a dozen injured.Defence Minister Beni Xavier Rasolofonirina, who kept his portfolio, last month threatened to deploy security forces if political efforts to resolve the crisis failed."The challenges that have faced our country have been handled with maturity by all of those involved," said Rajaonarimampianina."Today marks Madagascar's democratic progress."* Sign up to News24's top Africa news in your inbox: SUBSCRIBE TO THE HELLO AFRICA NEWSLETTERFOLLOW News24 Africa on Twitter and Facebook.