Mexico's military history includes all armed conflicts that occurred within its territory from the time of the arrival of Europeans (1519) to the present. Mexican military history is full of small-scale rebellions, foreign invasions and indigenous uprisings. Also, coups de tat by disgruntled military officers are common. The establishment of Mexico's colonial-era military didn't take place until the eighteenth Century. The Spanish crown didn't establish a standing army after the conquest of central Mexico by the Spanish in the early 16th century. However, it responded to an external threat from a British invasion and created a standing army for the first time since the Seven Years War (1756-1763). Regular army units and militias have a brief history. However, in the early 19th Century, Spain's unstable situation with Napoleonic invasion gave rise in an insurgency for independence. This was driven by darker, less-trained men who wanted to free Mexico from British rule. In 1820, the Mexican War of Independence (1810-21), saw insurgent and royalist armies fighting to the death. The stalemate was ended when the insurgent royalist officer, Agustin de Iturbide, persuaded Vicente Guerrero, the guerrilla leader of the rebels, to join a united movement for independence and form the Army of the Three Guarantees. The military of the royalists had to make a decision about whether to support Mexico's independence. The state became weaker after the Spanish state collapsed and was replaced by a monarchy under Iturbide, and later a republic. The Roman Catholic Church and military fared better in independence. Mexico's nineteenth century history was dominated by military men, especially General Antonio Lopez de Santa Anna. He led the Mexican army against Texas insurgents who wanted independence in 1836, and then the U.S. invasion (1846-48). Mexico briefly had civilian heads after the 1855 overthrow of Santa Anna and the establishment of a government composed of political liberals. Benito Juarez's Liberal Reforms sought to limit the power of the military, the church, and wrote an 1857 constitution that enshrined these principles. The Conservatives were large landowners and the Catholic Church. Most of the regular army rebelled against the Liberals, waging a civil war. The Conservative military was defeated on the battlefield. The Conservatives tried another way, and supported the French invasion of Mexico (1862-1865). The Mexican military loyal to the liberal republic was unable to stop the French invasion. They did, however, temporarily halt it with victory at Puebla on May 5, 1862. Mexican Conservatives supported Maximilian Hapsburg's installation as the Emperor of Mexico.