After winning the election in November 1999, President Tandja Mamadou was sworn in office on 22 December 1999 as the first president of the Fifth Republic. Mamadou brought about many administrative and economic reforms that had been halted due to the military coups since the Third Republic, as well as helped peacefully resolve a decades-long boundary dispute with Benin. In August 2002, serious unrest within military camps occurred in Niamey, Diffa, and Nguigmi, but the government was able to restore order within several days. On 24 July 2004, the first municipal elections in the history of Niger were held to elect local representatives, previously appointed by the government. These elections were followed by presidential elections, in which Mamadou was re-elected for a second term, thus becoming the first president of the republic to win consecutive elections without being deposed by military coups. The legislative and executive configuration remained quite similar to that of the first term of the president: Hama Amadou was reappointed as prime minister and Mahamane Ousmane, the head of the CDS party, was re-elected as the president of the National Assembly (parliament) by his peers.