The first elected head of government was Cuauhtémoc Cárdenas. He resigned in 1999 to run in the 2000 presidential elections and designated Rosario Robles to succeed him, who became the first woman, elected or otherwise, to govern Mexico City. In 2000, Andrés Manuel López Obrador was elected, and he resigned in 2005 to run in the 2006 presidential elections; Alejandro Encinas was designated by the Legislative Assembly to finish the term. In 2006, Marcelo Ebrard was elected to serve until 2012.