During a ceremony on Friday, Randrianirina swore the presidential oath in the country's highest court in the capital Antananarivo, reports AFP journalists on site. This just days after the coup that forced out President Andry Rajoelina.
The events have unfolded after weeks of youth-led protests against corruption, unemployment and recurring power and water shortages that developed into increasingly loud demands for the president's resignation.
Randrianirina led the military elite unit Capsat which over the weekend sided with the demonstrators and took power in a military coup.