The rise of centralized kingdoms among the Sakalava, Merina and other ethnic groups produced the island's first standing armies, first equipped with spears, but later with muskets, cannons and other firearms.
When President Philibert Tsiranana was forced to step down in 1972, a military directorate ensured an interim government before appointing one of its own, Admiral Didier Ratsiraka, to lead the country into its socialist Second Republic.
The majority were channeled into civil service, including agriculture and education programs for rural development based on the socialist Soviet model.
The military remained largely neutral during the protracted standoff between incumbent Ratsiraka and challenger Marc Ravalomanana in the disputed 2001 presidential elections.
By contrast, in 2009 a segment of the army defected to the side of Andry Rajoelina, then-mayor of Antananarivo, in support of his attempt to force President Ravalomanana from power.
It is widely believed that payoffs were involved in persuading these military personnel to change camps in support of the coup d'état.