Subsequently, after serving as Ambassador to Libya from 2006 to 2008,[1] Hmeida was appointed as Minister of Foreign Affairs and Cooperation in the government that was named on July 15, 2008.[2][3] He served in that post only briefly, however; President Sidi Ould Cheikh Abdallahi was ousted in a military coup on August 6, 2008, and Hmeida was replaced as Foreign Minister by Mohamed Mahmoud Ould Mohamedou in the government appointed by the junta on August 31.[4]