Madagascar's president, Hery Rajaonarimampianina, says a consensus government has now been appointed after negotiations. He said its main goal is to organise elections.
Last month, Madagascar's constitutional court ordered the president to appoint a new Prime Minister who would form a cabinet made up of politicians from all parties.
This followed a political deadlock and street protests over attempts to block an opposition presidential candidate and impeach the president.
The appointment of 30 new ministers has reduced tension, although the elections are likely to test the country's stability.