After his studies, he was a researcher at the CNRS and taught courses on Third World politics at the University of Paris I. Returning to Mali, he became a technical consultant for the European Development Fund, putting together the first small-scale development program for the European Union's aid activities in Mali. He went on to become Mali director for the French chapter of Terre des Hommes, an international NGO aiding children in the developing world.
Upon the founding of the Alliance for Democracy in Mali (ADEMA-PASJ), Keïta became its Secretary for African and International Relations at its constitutive congress, held on May 25–26, 1991.[5] He was the deputy director of ADEMA candidate Alpha Oumar Konaré's successful presidential campaign in 1992. The new president named him as his senior diplomatic adviser and spokesman in June 1992, and then in November of the same year appointed him ambassador to Côte d'Ivoire, Gabon, Burkina Faso and Niger.[1][2]
In November 1993, he became the Malian Minister of External Affairs, Malians Abroad, and African Integration. On February 4, 1994, President Konaré named him Prime Minister, a position he held until February 2000.[1][2] At ADEMA's first ordinary congress, held in September 1994, Keïta was elected as the President of the party.[6] Following presidential and parliamentary elections held in 1997, he resigned from his post as Prime Minister on September 13, 1997[7] and was reappointed by Konaré, with a new government appointed on September 16.[8]
Disagreements within ADEMA forced him to resign as Prime Minister on February 14, 2000, and then from the leadership of the party in October 2000. He then founded his own party, the Rally for Mali (RPM), which he has led since its creation, announced on June 30, 2001.[1][10] He stood as a candidate in the 2002 presidential election, receiving the strong backing of many Muslim leaders and associations. Despite this support, some people doubted that Keïta's policies were particularly compatible with Islam, pointing to the creation of casinos and lotteries while he was Prime Minister.[11] In the first round of the election, held on April 28, he received about 21% of the vote and took third place, behind Amadou Toumani Touré and Soumaïla Cissé.[12] He denounced the election as fraudulent, alleging that he was deliberately and falsely excluded from the second round, and along with other candidates sought for the results to be invalidated.[13][14] On May 9 the Constitutional Court ruled that the second round should proceed with Touré and Cissé as the top two candidates, despite acknowledging significant irregularities and disqualifying a quarter of the votes because of the irregularities.[15][16] According to the Constitutional Court, Keïta won 21.03% of the vote, only about 4,000 votes less than Cissé.[12][16] On the same day, Keïta announced the support of his Espoir 2002 alliance for Touré in the second round;[15][16] regarding the Court's ruling, he described himself as "a law-abiding person" and said that the Court had followed the law.[16] The second round was won by Touré.[17]
He ran for president again, as the candidate of the Rally for Mali party in the April 2007 election, having been designated as the party's candidate on January 28, 2007.[21] Touré won the election by a landslide, while Keita took second place and 19.15% of the vote.[22] As part of the Front for Democracy and the Republic (FDR), a coalition that included Keita as well as three other presidential candidates, Keita disputed the results and sought for the election to be annulled, alleging fraud.[23] On May 19, he said that the FDR would abide by the decision of the Constitutional Court to confirm Touré's victory.[24]
In the July 2007 parliamentary election, Keïta ran for re-election to the National Assembly from Commune IV in Bamako, where 17 lists competed for the two available seats,[25] on an RPM list together with Abdramane Sylla.[26] Keïta's list received 31.52% of the vote in the first round, held on July 1,[18][26] slightly ahead of the list of independent candidate Moussa Mara, which received 30.70%.[26] In the second round on July 22, Keïta's list narrowly prevailed, winning 51.59% of the vote according to provisional results.[27] He was not a candidate for re-election as President of the National Assembly at the opening of the new National Assembly on September 3; the position was won by ADEMA President Dioncounda Traoré.[3][28]