Madagascar: Confusion as president says PM has quit, PM says "No I haven't"
The president's office gave no explanation for the reported resignations, while Ravelonarivo said that the president had asked him to quit but that he had yet to hand in a resignation letter.
Ravelonarivo took office in January 2015 after public frustration with power cuts, rampant unemployment and a stagnant economy forced out the previous administration.
He survived a bid to sack him in July after the opposition group Mapar filed a censure motion, saying it was frustrated by the slow pace of change in the Indian Ocean island nation.
On Friday, secretary general of the presidency Roger Ralala said in a statement: "The president has accepted the resignation of (the) prime minister and all members of the government (...) The current members of the government are dealing with current business until the appointment of new members of the government."
Ravelonarivo, an air force commander and businessman, expressed surprise that President Hery Rajaonarimampianina's office had announced his resignation.
"I met the president and he asked me to resign. I told him that I would like to talk to my family about it. I was then surprised to learn that I had resigned. So far, I have not signed any letter of resignation," he told a news conference.
He did not say why the president had asked him to resign and did not say if or when he will hand in a resignation letter.
Madagascar has struggled to rebuild itself since a 2009 coup that scared off donors and foreign investors.
Donors resumed lending to Madagascar after successful elections in 2013 ended the political crisis and Rajaonarimampianina took office in January 2014.