By Lovasoa Rabary
ANTANANARIVO (Reuters) - Jean Ravelonarivo, an air force commander and businessman, was sworn in as Madagascar's new prime minister on Saturday promising to get to work swiftly although a legal challenge by a former president still hangs over his appointment.
President Hery Rajaonarimampianina named Ravelonarivo as premier this week, handing him the task of dealing with mounting complaints about blackouts and other problems that forced his predecessor to quit.
"Gone are the days of dreams. The time is to work," Ravelonarivo said in speech at the ceremony, attended by international officials.
But Andry Rajoelina, who became president after a 2009 coup and now heads the biggest party in parliament, has challenged the appointment in a top administrative court, extending political uncertainty in a country struggling to repair its economy. The court could take a week or more to rule.
Ravelonarivo said he would form a government "in a few days."
But analysts said Rajoelina's legal challenge, which argues the prime minister's appointment did not follow constitutional rules, could be aimed at securing more seats for his party in cabinet and haggling over posts could delay the formation.
Ravelonarivo has yet to outline a programme for the Indian Ocean island, whose economy has been in tatters since the 2009 coup drove off donors and investors. A peaceful 2013 election helped restore aid but economists say deep reforms are needed.
Weighed down by hefty power subsidies, the government does not have enough money to pay for fuel for power stations even though they serve only some of the 24 million population.
(Writing by Edmund Blair; Editing by Rosalind Russell)