Mexico effectively became a democracy in 2000 as a result of the end of one-party rule when the Institutional Revolutionary Party (PRI) was removed from power by the election of Vincente Fox of the National Action Party (PAN). The PRI's one-party rule began in 1929 after a period of political turmoil and a series of coups that have been collectively termed the Mexican Revolution, but have also been described as a civil war. The PRI returned to power in 2012 with the election of President Enrique Pena Nieto.
Mexico was a Spanish colony between 1650 and 1821. The signing of the Declaration of Independence of the Mexican Empire on August 24, 1821 formally established Mexico as a sovereign nation. Augustin de Iturbide immediately declared himself emperor. He was overthrown in a revolt in 1823 and civil war spread across Mexico the following year.
During the 1860s, Mexico was occupied by France and the Hapsburg Archduke Ferdinand Maximilian of Austria was installed a ruler. He was executed in 1867 and Porfirio Diaz, a general during the French occupation, ruled Mexico for a total of nearly 30 years until the Mexican Revolution began in 1910.