In 1991, Tandja retired from the army and assumed the leadership of the MNSD (Mouvement National pour la Société de Développement), which had formerly been Niger's sole political party. He ran for president in 1993 and 1996, losing by a narrow margin in the 1993 election. He was beaten in the runoffs by Mahamane Ousmane, who had garnered the support of a nine-party coalition. Tandja lost again in 1996 to General Mainassara, whose reign was known for nepotism, imprisonment of opposition leaders, and military mutinies. Students, civil servants, and union members staged protest demonstrations. When Major Daouda Mallam Wanké agreed to hold elections (shortly after murdering Mainassara), Tandja had his chance to win the presidency.
In run-off elections held in November 1999, Tandja was elected president of Niger with 60% of the vote. His inauguration on December 22, 1999, marked his country's return to civilian government.