A few months after his return, Ben Ali became secretary of state for National Security; he was then named minister of national security in October 1985, and minister of interior in April 1986. In that same year, he was made undersecretary general of the RCD party. The final appointment under Bourguiba came on 2 October 1987 when he was appointed prime minister and secretary general of the party.
According to Article 57 of the 1959 Tunisian Constitution then in effect, the prime minister was to assume the presidency in case of death, resignation or permanent inability of the president. Using this provision, Ben Ali deposed Bourguiba on 7 November 1987. The former president, who was 84, was judged by most people as having become mentally unstable, senile, erratic and more dictatorial than ever. His ouster was, therefore, almost unanimously welcomed by the Tunisians.
Since taking power in 1987, Ben Ali has run for president three times. After his first election he pushed through amendments to the Constitution that made the president of the Chamber of Deputies, rather than the prime minister, the successor to a president unable to continue in office. Furthermore, that individual would then be precluded from running for the office in new elections, thus precluding the route to power that he had used. In the first two elections, in 1989 and 1994, he ran unopposed. In the 1999 elections he faced two opponents, Mohamed Belhaj Amor, who garnered0.3% of the votes and Abderrahmane Tlili, who received0.2% of the votes. Two other potential candidates were arrested after announcing their intention to run: Abderrahmane el-Hani, a lawyer and leader of a political party that the government would not recognize, and Moncef Marzouki, a vocal critic of the regime's human rights record.