The political independence and sovereignty of the Malagasy armed forces, which comprises an army, navy and air force, was restored with independence from France in 1960. Since this time the Malagasy military has never engaged in armed conflict with another state or within its own borders, but has occasionally intervened to restore order during periods of political unrest. Under the socialist Second Republic, Admiral Didier Ratsiraka instated mandatory national armed or civil service for all young citizens regardless of sex, a policy that remained in effect from 1976 to 1991. The armed forces are under the direction of the Minister of Defense and have remained largely neutral during times of political crisis, as during the protracted standoff between incumbent Ratsiraka and challenger Marc Ravalomanana in the disputed 2001 presidential elections, when the military refused to intervene in favor of either candidate. This tradition was broken in 2009, when 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.