ANTANANARIVO (AFP) - The Madagascan army transferred power to opposition leader Andry Rajoelina during a ceremony attended by journalists on Tuesday. "We have categorically rejected the (military) authority that (president Marc) Ravalom-anana asked us to set up after his resignation," Vice Admiral Hip-polyte Rarison Ramaroson said. "We transfer full powers to Andry Rajoelina, who will oversee the transition," he added. Ramaroson, who was speaking during a ceremony at a military camp, had been appointed by Ravalomanana to the head of a transitional military authority created to rule the country. Ravalo-manana resigned earlier Tuesday under pressure from the army. Earlier, Madagascar's beleaguered President Marc Ravalomanana resigned and transferred power to the military on Tuesday after a months-long political crisis which left around 100 people dead. Hours after the army had blasted its way into his offices and let his arch rival Andry Rajoelina take control, an isolated Ravalomanana bowed to the inevitable and signed away his power in a presidential decree. "Full powers are given to a military authority headed by eldest in the highest rank of all forces," said a statement issued by his office, without specifying who that would be. The move marked a dramatic victory for Andry Rajoelina, the sacked mayor of Antananarivo who has been leading a months-long push to topple Ravaloma-nana after seven years as president of the Indian Ocean island. Rajoelina had earlier been cheered by thousands of supporters and saluted by the army as he took over a deserted presidency in the city centre. The beleaguered President received support from his African peers but remained holed up in the presidential palace on the outskirts of the capital with a handful of diehard loyalists before the resignation announcement. The proposed lifespan of military rule on the island and other details of the arrangement were not immediately known. The 34-year-old Rajoelina was already behaving like the country's new ruler however when he entered the presidential compound in the wake of a spectacular night-time assault by the army backed by around 100 tanks. "I solemnly declare that I will not spare any effort," he said, proclaiming that the transitional authority he set up last month was in charge of the country's affairs. "We are now free but the road ahead remains rough," he added, as Christian bishops conducted ceremonies in the presidential compound to mark the occasion. The army's move on the compound on Monday night effectively sealed the president's fate, after a protracted political feud with Rajoelina that flared up late last year and left at least 97 people dead. Ravalomanana's whereabouts following his resignation were not immediately clear but speculation has abounded for days that he might flee into exile. Most of his family already left when he lost control of the army last week. The President, in power for the last seven years, had been in a defiant mood until Monday and attempted to dispel intense speculation that he would go into exile, according to presidential spokesman Andry Ralijaona. "I am staying with you and if I have to die, I will die with you," the spokesman quoted Ravalomanana as telling his remaining guards in the palace. "The President is still in Iavoloha. He is saddened by what is happening," Ralijaona told AFP. After the army and part of his own guard turned against him last week, Ravalomanana proposed a referendum to decide his feud with Rajoelina. Rajoelina rejected the offer Monday and the army made it clear which side it is backing. "We seized the presidency to hasten Ravalomanana's departure," the army chief said Monday. Rajoelina, a 34-year-old DJ-turned-businessman who has led popular Opposition to the government, has urged the country's security forces to arrest the President for "high treason". Rajoelina, accusing his rival of being a dictator starving his people, has used his charisma and own private television station to mount a brazen challenge on the country's top office.