# Mexican War of Independence

The Mexican War of Independence (Spanish: Guerra de Independencia de México, 16 September 1810 – 27 September 1821) was an armed conflict and political process resulting in Mexico's independence from the Spanish Empire. It was not a single, coherent event, but local and regional struggles that occurred within the same period, and can be considered a revolutionary civil war. It culminated with the drafting of the Declaration of Independence of the Mexican Empire in Mexico City on September 28, 1821, following the collapse of royal government and the military triumph of forces for independence.
Mexican independence from Spain was not an inevitable outcome of the relationship between the Spanish Empire and its most valuable overseas possession, but events in Spain had a direct impact on the outbreak of the armed insurgency in 1810 and the course of warfare through the end of the conflict. Napoleon Bonaparte's invasion of Spain in 1808 touched off a crisis of legitimacy of crown rule, since he had placed his brother Joseph on the Spanish throne after forcing the abdication of the Spanish monarch Charles IV. In Spain and many of its overseas possessions, the local response was to set up juntas, ruling in the name of the Bourbon monarchy. Delegates in Spain and overseas territories met in Cádiz—a small corner of the Iberian Peninsula still under Spanish control—as the Cortes of Cádiz, and drafted the Spanish Constitution of 1812. That constitution sought to create a new governing framework in the absence of the legitimate Spanish monarch. It tried to accommodate the aspirations of American-born Spaniards (criollos) for more local control and equal standing with Peninsular-born Spaniards, known locally as peninsulares. This political process had far-reaching impacts in New Spain during the independence war and beyond. Pre-existing cultural, religious, and racial divides in Mexico played a major role in not only the development of the independence movement but also the development of the conflict as it progressed.
The conflict had several phases. The first uprising for independence was led by parish priest Miguel Hidalgo y Costilla, who issued the Cry of Dolores on 16 September 1810. The revolt was massive and not well organized. Hidalgo was captured by royalist forces, defrocked from the priesthood, and executed in July 1811. The second phase of the insurgency was led by Father José María Morelos, who was captured by royalist forces and executed in 1815. The insurgency devolved into guerrilla warfare, with Vicente Guerrero emerging as a leader. Neither royalists nor insurgents gained the upper hand, with military stalemate continuing until 1821, when former royalist commander Agustín de Iturbide made an alliance with Guerrero under the Plan of Iguala in 1821. They formed a unified military force rapidly bringing about the collapse of royal government and the establishment of independent Mexico. The unexpected turn of events in Mexico was prompted by events in Spain. When Spanish liberals overthrew the autocratic rule of Ferdinand VII in 1820, conservatives in New Spain saw political independence as a way to maintain their position. The unified military force entered Mexico City in triumph in September 1821 and the Spanish viceroy Juan O'Donojú signed the Treaty of Córdoba, ending Spanish rule.
Following independence, the mainland of New Spain was organized as the First Mexican Empire, led by Agustín de Iturbide. This ephemeral constitutional monarchy was overthrown and a federal republic was declared in 1823 and codified in the Constitution of 1824. After some Spanish reconquest attempts, including the expedition of Isidro Barradas in 1829, Spain under the rule of Isabella II recognized the independence of Mexico in 1836.

## Prior challenges to crown rule

There is evidence that even from an early period in post-conquest Mexican history, some began articulating the idea of a separate Mexican identity, though at the time this would have occurred only among elite Creole circles. Despite these murmurings of independence, serious challenges to Spanish imperial power before 1810 were rare and relatively isolated.
One early challenge to crown authority came after the introduction of the New Laws in 1542 by Charles V, Holy Roman Emperor. Under these laws, the grants of the encomenderos were to be ended following the deaths of the current grant holders. The encomenderos' conspiracy included Don Martín Cortés, son of Hernán Cortés, who was exiled, with other conspirators executed.
Another challenge to crown authority occurred in 1624 when elites ousted the reformist Viceroy Diego Carrillo de Mendoza, 1st Marquess of Gelves, who sought to break up crime rackets from which the elites profited and curtail opulent displays of clerical power. The viceroy was removed following an urban religious riot of Mexico City commoners in 1624 stirred up by the elites. The crowd, which was mostly Catholic, was reported to have shouted, "Long live the King! Long live Christ! Death to bad government! Death to the heretic Lutheran [Viceroy Gelves]! Arrest the viceroy!" The attack was specifically against Gelves, seen as a bad representative of the crown, rather than against the monarchy or colonial rule itself.
In 1642, there was a brief conspiracy to unite American-born Spaniards, blacks, Indians and castas against the Spanish crown and proclaim Mexican independence. The man seeking to bring about independence called himself Don Guillén Lampart y Guzmán, an Irishman with the birthname William Lamport. Lamport's conspiracy was discovered, and he was arrested by the Inquisition in 1642 and executed fifteen years later for sedition. Today, there is a statue of Lamport in the mausoleum at the base of the Angel of Independence in Mexico City.
In 1692, there was a major riot in Mexico City, where a plebeian mob attempted to burn down the viceroy's palace and the archbishop's residence. A painting by Cristóbal de Villalpando shows the damage of the tumulto. Unlike the riot in 1624, in which elites were involved and the viceroy ousted with no repercussions against the instigators, the 1692 riot was instigated by plebeians alone and had an additional racial component. The rioters attacked key symbols of Spanish power and shouted political slogans, such as, "Kill the [American-born] Spaniards and the Gachupines [Iberian-born Spaniards] who eat our corn! We go to war happily! God wants us to finish off the Spaniards! We do not care if we die without confession! Is this not our land?" The viceroy attempted to address the cause of the riot, a hike in maize prices that affected the urban poor. But the 1692 riot "represented class warfare that put Spanish authority at risk. Punishment was swift and brutal, and no further riots in the capital challenged the Pax Hispanica."
Food shortages almost a century later, due to a growing population and severe droughts, led to two food riots in 1785 and 1808. The first riot was more severe, but both culminated in violence and anger at officials of the colonial regime. However, there is no direct link between these riots and the independence movement of 1810, although the 1808–1809 food shortage may have been a contributory factor for popular resentment at the political regime.
Various indigenous rebellions in the colonial era occurred but were generally local in nature, attempting to redress perceived wrongs of immediate authorities rather than throw off crown rule more broadly. They were not a broad independence movement as such. However, during the War of Independence, issues at the local level in these rural areas were so widespread as to constitute what some historians have called "the other rebellion".
Finally, before the events of 1808 upended the political situation in New Spain, there was an isolated and abortive 1799 event called the Conspiracy of the Machetes, perpetrated by a small group in Mexico City seeking independence.

## Age of Revolution, Spain and New Spain

In the early 19th century, the Age of Revolution was already underway when the 1808 Napoleonic invasion of the Iberian Peninsula destabilized not only Spain but also Spain's overseas possessions. In 1776, the Anglo-American Thirteen Colonies and the American Revolution successfully gained their independence in 1783, with the help of both the Spanish Empire and Louis XVI's French monarchy. Louis XVI was toppled in the French Revolution of 1789, with the aristocrats and the king himself losing his head in revolutionary violence. The rise of military strongman Napoleon Bonaparte brought some order within France, but the turmoil there set the stage for the black slave revolt in the French sugar colony of Saint-Domingue (Haiti) in 1791. The Haitian Revolution obliterated the slavocracy and gained independence for Haiti in 1804.

### Political and economic instability

Tensions in New Spain were growing after the mid-eighteenth-century Bourbon reforms. With the reforms the crown sought to increase the power of the Spanish state, decrease the power of the Catholic church, rationalize and tighten control over the royal bureaucracy by placing peninsular-born officials rather than American-born, and increase revenues to the crown by a series of measures that undermined the economic position of American-born elites. The reforms were an attempt to revive the political and economic fortunes of the Spanish empire, but many historians see the reforms as accelerating the breakdown of its unity. This involved often removing large quantities of wealth that had been obtained in Mexico, before exporting to other parts of the empire to fund the many wars the Spanish were fighting.
The crown removed privileges (fuero eclesiástico) from ecclesiastics that had a disproportionate impact on American-born priests, who filled the ranks of the lower clergy in New Spain. A number of parish priests, most famously Miguel Hidalgo and José María Morelos, subsequently became involved in the insurgency for independence. When the crown expelled the Jesuits from Spain and the overseas empire in 1767, it had a major impact on elites in New Spain, whose Jesuit sons were sent into exile, and cultural institutions, especially universities and colleges where they taught were affected. In New Spain there were riots in protest of their expulsion.
Colonial rule was not based on outright coercion, until the early nineteenth century, since the crown did not have sufficient personnel and firepower to enforce its rule. Rather, the crown's hegemony and legitimacy to rule was accepted and ruled through institutions acting as mediators between competing groups, many organized as corporate entities. These were ecclesiastics, mining entrepreneurs, elite merchants, as well as indigenous communities. The crown's creation of a standing military in the 1780s began to shift the political calculus since the crown could now use an armed force to impose rule. To aid building a standing military, the crown created set of corporate privileges (fuero) for the military. For the first time, mixed-race castas and blacks had access to corporate privileges, usually reserved for white elites.
Silver entrepreneurs and large-scale merchants also had access to special privileges. Lucrative overseas trade was in the hands of family firms based in Spain with ties to New Spain. Silver mining was the motor of the economy of New Spain, but also fueled the economies of Spain and the entire Atlantic world. That industry was in the hands of peninsula-born mine owners and their elite merchant investors. The crown imposed new regulations to boost their revenues from their overseas territories, particularly the consolidation of loans held by the Catholic Church. The 1804 Act of Consolidation called for borrowers to immediately repay the entire principal of the loan rather than stretch payments over decades. Borrowers were criollo land owners who could in no way repay large loans on short notice. The impact threatened the financial stability of elite Americans. The crown's forced extraction of funds is considered by some a key factor in Creoles considering political independence.

### Religious, racial, and cultural tensions

Within the Spanish Empire there was an unofficial yet apparent racial hierarchy which affected the social mobility of those not at the top of society. White, Spanish-born Peninsulares were at the top where many occupied the highest levels of government. This was followed by Mexican-born pure Spanish descendants, who also occupied most government positions, and Creoles. Below this were indigenous groups, African Mexicans and mixed race Mexicans. Many Creole elites deeply resented the lack of social mobility this brought as only Peninsular-born Spaniards could occupy the highest levels of government. This contributed to their reasoning behind backing the move for independence, to achieve power. They did not wish to overthrow the status quo entirely, as this would threaten their lucrative position in Mexican society. Instead, they wished to move up the social ladder, unable to under the unspoken racial hierarchy of the regime.
Religious tension is arguably one of the biggest contributions to tension before the French invasion of Spain in 1808. Many Creoles, Mexican Spaniards and the majority of indigenous, mixed and African groups in Mexico practiced Mexican Catholicism while the ruling Peninsulares preferred Modern Catholicism. Mexican or traditional Catholicism often worshiped through the use of relics, symbols and artifacts where they believe the Holy Spirit existed in the physical form of the artifact, and was a mix of traditional indigenous forms of worship and Catholicism. This contrasted with the view of modern Catholicism that many Peninsulares shared, where God was worshiped through divine artifacts and relics, but there was no religious presence within the physical artifact. Laws prohibiting Lay preachers, a major part of Mexican Catholicism, from preaching and restrictions on villagers to engage in processions around communal land to protect from unwanted spirits caused much outcry and prompted a multitude of legal battles between indigenous groups and the colonial regime through the separate indigenous courts. Not only this, but new laws essentially forcing indigenous groups to learn Spanish in schools and the taxation of Cofradias or Confraternities negatively affected the literacy and living standards in villages.
The ruling white Spanish elite and the majority of the country had very different views not only in culture and religion but on the role of government and social relations, with many elites viewing the government as a tool for progressing their own power, while indigenous groups saw the government as a communal vessel.
Leading up to the crisis in 1808 both Creole and Mexican-born Spaniards, and indigenous and mixed groups had come to dislike the colonial regime for different reasons.

## French invasion of Spain and political crisis in New Spain, 1808–1809

The Napoleonic invasion of the Iberian Peninsula destabilized not only Spain but also Spain's overseas possessions. The viceroy was the "king's living image" in New Spain. In 1808 viceroy José de Iturrigaray (1803–1808) was in office when Napoleon's forces invaded Iberia and deposed the Spanish monarch Charles IV and Napoleon's brother Joseph was declared the monarch. This turn of events set off a crisis of legitimacy. Viceroy Iturrigaray had been appointed by Charles IV, so his legitimacy to rule was not in doubt. In Mexico City, the city council (ayuntamiento), a stronghold of American-born Spaniards, began promoting ideas of autonomy for New Spain, and declaring New Spain to be on an equal basis to Spain.
Their proposal would have created a legitimate, representative, and autonomous government in New Spain, but not necessarily breaking from the Spanish Empire. Opposition to that proposal came from conservative elements, including the peninsular-born judges of the High Court (Audiencia), who voiced Peninsular interests. Iturrigaray attempted to find a compromise between the two factions, but failed. Upon hearing the news of the Napoleonic invasion some elites suspected that Iturrigaray intended to declare the viceroyalty a sovereign state and perhaps establish himself as head of a new state. With the support of the archbishop, Francisco Javier de Lizana y Beaumont, landowner Gabriel de Yermo, the merchant guild of Mexico City (consulado), and other members of elite society in the capital, Yermo led a coup d'état against the viceroy. They stormed the Viceregal Palace in Mexico City, the night of 15 September 1808, deposing the viceroy, and imprisoning him along with some American-born Spanish members of the city council.
The peninsular rebels installed Pedro de Garibay as viceroy. Since he was not a crown appointee, but rather the leader of a rebel faction, creoles viewed him as an illegitimate representative of the crown. The event radicalized both sides. For creoles, it was clear that to gain power they needed to form conspiracies against Peninsular rule, and later they took up arms to achieve their goals. Garibay was of advanced years and held office for just a year, replaced by Archbishop Lizana y Beaumont, also holding office for about a year. There was a precedent for the archbishop serving as viceroy, and given that Garibay came to power by coup, the archbishop had more legitimacy as ruler. Francisco Javier Venegas was appointed viceroy and landed in Veracruz in August, reaching Mexico City 14 September 1810. The next day, Hidalgo issued his call to arms in Dolores.
Immediately after the Mexico City coup ousting Iturrigaray, juntas in Spain created the Supreme Central Junta of Spain and the Indies, on 25 September 1808 in Aranjuez. Its creation was a major step in the political development in the Spanish empire, once it became clear that there needed to be a central governing body rather than scattered juntas of particular regions. Joseph I of Spain had invited representatives from Spanish America to Bayonne, France for a constitutional convention to discuss their status in the new political order. It was a shrewd political move, but none accepted the invitation. However, it became clear to the Supreme Central Junta that keeping his overseas kingdoms loyal was imperative. Silver from New Spain was vital for funding the war against France. The body expanded to include membership from Spanish America, with the explicit recognition that they were kingdoms in their own right and not colonies of Spain. Elections were set to send delegates to Spain to participate in the Supreme Central Junta.
Although in the Spanish Empire there was not an ongoing tradition of high level representative government, found in Britain and British North America, towns in Spain and New Spain had elected representative ruling bodies, the cabildos or ayuntamientos, which came to play an important political role when the legitimate Spanish monarch was ousted in 1808. The successful 1809 elections in Mexico City for delegates to be sent to Spain had some precedents.

## The Hidalgo revolt, 1810–1811

Miguel Hidalgo y Costilla is now considered the father of Mexican independence. His uprising on 16 September 1810 is considered the spark igniting the Mexican War of Independence. He inspired tens of thousands of ordinary men to follow him, but did not organize them into a disciplined fighting force or have a broad military strategy, but he did want to destroy the old order. Fellow insurgent leader and second in command, Ignacio Allende, said of Hidalgo, "Neither were his men amenable to discipline, nor was Hidalgo interested in regulations." Hidalgo issued a few important decrees in the later stage of the insurgency, but did not articulate a coherent set of goals much beyond his initial call to arms denouncing bad government. Only following Hidalgo's death in 1811 under the leadership of his former seminary student, Father José María Morelos, was a document created that made explicit the goals of the insurgency, the Sentimientos de la Nación ("Sentiments of the Nation") (1813). One clear point was political independence from Spain. Despite its having only a vague ideology, Hidalgo's movement demonstrated the massive discontent and power of Mexico's plebeians as an existential threat to the imperial regime. The government focused its resources on defeating Hidalgo's insurgents militarily and in tracking down and publicly executing its leadership. But by then the insurgency had spread beyond its original region and leadership.
Hidalgo was a learned priest who knew multiple languages, had a significant library, and was friends with men who held Enlightenment views. He held the important position of rector of the Seminary of San Nicolás, but had run afoul of the Inquisition for unorthodox beliefs and speaking against the monarchy. He had already sired two daughters with Josefa Quintana. Following the death of his brother Joaquín in 1803, Hidalgo, who was having money problems due to debts on landed estates he owned, became curate of the poor parish of Dolores. He became member of a group of well-educated American-born Spaniards in Querétaro. They met under the guise of being a literary society, supported by the wife of crown official (corregidor) Miguel Domínguez, Josefa Ortíz de Domínguez, known now as "La Corregidora". Instead the members discussed the possibility of a popular rising, similar to one that already had recently been quashed in Valladolid (now Morelia) in 1809 in the name of Ferdinand VII.
Hidalgo was friends with Ignacio Allende, a captain in the regiment of Dragoons in New Spain, who was also among the conspirators. The "Conspiracy of Querétaro" began forming cells in other Spanish cities in the north, including Celaya, Guanajuato, San Miguel el Grande, now named after Allende. Allende had served in a royal regiment during the rule of José de Iturrigaray, who was overthrown in 1808 by peninsular Spaniards who considered him too sympathetic to the grievances of American-born Spaniards. With the ouster of the viceroy, Allende turned against the new regime and was open to the conspiracy for independence. Hidalgo joined the conspiracy, and with Allende vouching for him rose to being one of its leaders. Word of the conspiracy got to crown officials, and the corregidor Domínguez cracked down, but his wife Josefa was able to warn Allende who then alerted Hidalgo. At this point there was no firm ideology or action plan, but the tip-off galvanized Hidalgo to action. On Sunday, 16 September 1810 with his parishioners gathered for mass, Hidalgo issued his call to arms, the Grito de Dolores. It is unclear what Hidalgo actually said, since there are different accounts. The one which became part of the official record of accusation against Hidalgo was "Long live religion! Long live Our Most Holy Mother of Guadalupe! Long live Fernando VII! Long live America and down with bad government!"
From a small gathering at the Dolores church, others joined the uprising including workers on local landed estates, prisoners liberated from jail, and a few members of a royal army regiment. Many estate workers' weapons were agricultural tools now to be used against the regime. Some were mounted and acted as a cavalry under the direction of their estate foremen. Others were poorly armed Indians with bows and arrows. The numbers joining the revolt rapidly swelled under Hidalgo's leadership, they began moving beyond the village of Dolores. Despite rising tensions following the events of 1808, the royal regime was largely unprepared for the suddenness, size, and violence of the movement.
The religious character of the movement was present from the beginning, embodied in leadership of the priest, Hidalgo. The movement's banner with image of the Virgin of Guadalupe, seized by Hidalgo from the church at Atotonilco, was symbolically important. The "dark virgin" was seen as a protector of dark-skinned Mexicans, and now seen as well as a liberator. Many men in Hidalgo's forces put the image of Guadalupe on their hats. Supporters of the imperial regime took as their patron the Virgin of Remedios, so that religious symbolism was used by both insurgents and royalists. There were a number of parish priests and other lower clergy in the insurgency, most prominently Hidalgo and José María Morelos, but the Church hierarchy was flatly opposed. Insurgents were excommunicated by the clergy and clerics preached sermons against the insurgency.
They were not organized in any formal fashion, more of a mass movement than an army. Hidalgo inspired his followers, but did not organize or train them as a fighting force, nor impose order and discipline on them. A few militia men in uniform joined Hidalgo's movement and attempted to create some military order and discipline, but they were few in number. The bulk of the royal army remained loyal to the imperial regime, but Hidalgo's rising had caught them unprepared and their response was delayed. Hidalgo's early victories gave the movement momentum, but "the lack of weapons, trained soldiers, and good officers meant that except in unusual circumstances the rebels could not field armies capable of fighting conventional battles against the royalists."
The growing insurgent force marched through towns including San Miguel el Grande and Celaya, where they met little resistance, and gained more followers. When they reached the town of Guanajuato on 28 September, they found Spanish forces barricaded inside the public granary, Alhóndiga de Granaditas. Among them were some 'forced' Royalists, creoles who had served and sided with the Spanish. By this time, the rebels numbered 30,000 and the battle was horrific. They killed more than 500 European and American Spaniards, and marched on toward Mexico City.
The new viceroy quickly organized a defense, sending out the Spanish general Torcuato Trujillo with 1,000 men, 400 horsemen, and two cannons—all that could be found on such short notice. The crown had established a standing military in the late eighteenth century, granting non-Spaniards who served the fuero militar, the only special privileges for mixed-race men were eligible. Indians were excluded from the military. Royal army troops of the professional army were supplemented by local militias. The regime was determined to crush the uprising and attempted to stifle malcontents who might be drawn to the insurgency.
Ignacio López Rayón joined Hidalgo's forces whilst passing near Maravatío, Michoacan while en route to Mexico City and on 30 October, Hidalgo's army encountered Spanish military resistance at the Battle of Monte de las Cruces. As the Hidalgo and his forces surrounded Mexico City, a group of 2,500 royalist women joined under Ana Iraeta de Mier, to create and distribute pamphlets based on their loyalty towards Spain and help fellow loyalist families. Hidalgo's forces continued to fight and achieved victory. When the cannons were captured by the rebels, the surviving Royalists retreated to the city.
Despite apparently having the advantage, Hidalgo retreated, against the counsel of Allende. This retreat, on the verge of apparent victory, has puzzled historians and biographers ever since. They generally believe that Hidalgo wanted to spare the numerous Mexican citizens in Mexico City from the inevitable sacking and plunder that would have ensued. His retreat is considered Hidalgo's greatest tactical error and his failure to act "was the beginning of his downfall." Hidalgo moved west and set up headquarters in Guadalajara, where one of the worst incidents of violence against Spanish civilians occurred, a month of massacres from 12 December 1810 (the Feast of the Virgin of Guadalupe) to 13 January 1811. At his trial following his capture later that year, Hidalgo admitted to ordering the murders. None "were given a trial, nor was there any reason to do so, since he knew perfectly well they were innocent." In Guadalajara, the image of the Virgin of Guadalupe suddenly disappeared from insurgents' hats and there were many desertions.
The royalist forces, led by Félix María Calleja del Rey, were becoming more effective against disorganized and poorly armed of Hidalgo, defeating them at a bridge on the Calderón River, forcing the rebels to flee north towards the United States, perhaps hoping they would attain financial and military support. They were intercepted by Ignacio Elizondo, who pretended to join the fleeing insurgent forces. Hidalgo and his remaining soldiers were captured in the state of Coahuila at the Wells of Baján (Norias de Baján).$^{:26–27}$ When the insurgents adopted the tactics of guerrilla warfare and operated where it was effective, such as in the hot country of southern Mexico, they were able to undermine the royalist army. Around Guanajuato, regional insurgent leader Albino García [es] for a time successfully combined insurgency with banditry. With the capture of Hidalgo and the creole leadership in the north, this phase of the insurgency was at an end.
The captured rebel leaders were found guilty of treason and sentenced to death, except for Mariano Abasolo, who was sent to Spain to serve a life sentence in prison. Allende, Jiménez, and Aldama were executed on 26 June 1811, shot in the back as a sign of dishonor.$^{:27}$ Hidalgo, as a priest, had to undergo a civil trial and review by the Inquisition. He was eventually stripped of his priesthood, found guilty, and executed on 30 July 1811. The heads of Hidalgo, Allende, Aldama, and Jiménez were preserved and hung from the four corners of the Alhóndiga de Granaditas of Guanajuato as a grim warning to those who dared follow in their footsteps.$^{:27}$

## Insurgency in the South under Morelos, 1811–1815

Warfare in the northern Bajío region waned after the capture and execution of the insurgency's creole leadership, but the insurgency had already spread to other more southern regions, to the towns of Zitácuaro, Cuautla, Antequera (now Oaxaca) towns where a new leadership had emerged. Priests José María Morelos and Mariano Matamoros, as well as Vicente Guerrero, Guadalupe Victoria, and Ignacio López Rayón carried on the insurgency on a different basis, organizing their forces, using guerrilla tactics, and importantly for the insurgency, creating organizations and creating written documents that articulated the insurgents' goals.
Following the execution of Hidalgo and other insurgents, leadership of the remaining insurgent movement initially coalesced under Ignacio López Rayón, a civilian lawyer and businessman. He had been stationed in Saltillo, Coahuila with 3,500 men and 22 cannons. When he heard of the capture of the insurgent leaders, he fled south on 26 March 1811 to continue the fight. He subsequently fought the Spanish in the battles of Puerto de Piñones, Zacatecas, El Maguey, and Zitácuaro.
In an important step, Rayón organized the Suprema Junta Gubernativa de América (Supreme National Governing Junta of America), which claimed legitimacy to lead the insurgency. Rayón articulated Elementos constitucionales, which states that "Sovereignty arises directly from the people, resides in the person of Ferdinand VII, and is exercised by the Suprema Junta Gubernativa de América. The Supreme Junta generated a flood of detailed regulations and orders. On the ground, Father José María Morelos pursued successful military engagements, accepting the authority of the Supreme Junta. After winning victories and taking the port of Acapulco, then the towns Tixtla, Izúcar, and Taxco, Morelos was besieged for 72 days by royalist troops under Calleja at Cuautla. The Junta failed to send aid to Morelos. Morelos's troops held out and broke out of the siege, going on to take Antequera, (now Oaxaca). The relationship between Morelos and the Junta soured, with Morelos complaining, "Your disagreements have been of service to the enemy."
Morelos was a real contrast to Hidalgo, although both were rebel priests. Both had sympathy for Mexico's downtrodden, but Morelos was of mixed-race while Hidalgo was an American-born Spaniard, so Morelos experientially understood racial discrimination in the colonial order. On more practical grounds, Morelos built an organized and disciplined military force, while Hidalgo's followers lacked arms, training, or discipline, an effective force that the royal army took seriously. Potentially Morelos could have taken the colony's second largest city, Puebla de los Angeles, situated halfway between the port of Veracruz and the capital, Mexico City. To avert that strategic disaster, which would have left the capital cut off from its main port, viceroy Venegas transferred Calleja from the Bajío to deal with Morelos's forces. Morelos's forces moved south and took Oaxaca, allowing him to control most of the southern region. During this period, the insurgency had reason for optimism and formulated documents declaring independence and articulating a vision for a sovereign Mexico.
Morelos was not ambitious to become leader of the insurgency, but it was clear that he was recognized by insurgents as its supreme military commander. He moved swiftly and decisively, stripping Rayón of power, dissolving the Supreme Junta, and in 1813, Morelos convened the Congress of Chilpancingo, also known as the Congress of Anáhuac. The congress brought together representatives of the insurgency together. Morelos formulated his Sentiments of the Nation, addressed to the congress. In point 1, he clearly and flatly states that "America is free and independent of Spain."
On 6 November of that year, the Congress signed the first official document of independence, known as the Solemn Act of the Declaration of Independence of Northern America. In addition to declaring independence from Spain, the Morelos called for the establishment of Catholicism as the only religion (but with certain restrictions), the abolition of slavery and racial distinctions between and of all other nations," going on in point 5 to say, "sovereignty springs directly from the People." His second point makes the "Catholic Religion" the only one permissible, and that "Catholic dogma shall be sustained by the Church hierarchy" (point 4). The importance of Catholicism is further emphasized to mandate December 12, the feast of the Virgin of Guadalupe, as a day to honor her. A provision of key importance to dark-skinned plebeians (point 15) is "That slavery is proscribed forever, as well as the distinctions of caste [race], so that all shall be equal; and that the only distinction between one American and another shall be that between vice and virtue.". Also important for Morelos's vision of the new nation was equality before the law (point 13), rather than maintaining special courts and privileges (fueros) to particular groups, such as churchmen, miners, merchants, and the military.
The Congress elected Morelos as the head of the executive branch of government, as well as supreme commander of the insurgency, coordinating its far-flung components. The formal statement by the Congress of Chilpancingo, the Solemn Act of the Declaration of Independence, is an important formal document in Mexican history, since it declares Mexico an independent nation and lays out its powers as a sovereign state to make war and peace, to appoint ambassadors, and to have standing with the Papacy, rather than indirectly through the Spanish monarch. The document enshrines Roman Catholicism the sole religion.
Calleja restructured the royal army in an attempt to crush the insurgency, creating commands in Puebla, Valladolid (now Morelia), Guanajuato, and Nueva Galicia, with experienced peninsular military officers to lead them. American-born officer Agustín de Iturbide was part of this royalist leadership. Brigadier Ciriaco de Llano captured and executed Mariano Matamoros, an effective insurgent. After the dissolution of the Congress of Chilpancingo, Morelos was captured 5 November 1815, interrogated, was tried and executed by firing squad. With his death, conventional warfare ended and guerrilla warfare continued uninterrupted.

## Insurgency under Vicente Guerrero, 1815–1820

With the execution of Morelos in 1815, Vicente Guerrero emerged as the most important leader of the insurgency. From 1815 to 1821, most of the fighting for independence from Spain was by guerrilla forces in the tierra caliente (hot country) of southern Mexico and to a certain extent in northern New Spain. In 1816, Francisco Javier Mina, a Spanish military leader who had fought against Ferdinand VII, joined the independence movement. Mina and 300 men landed at Rio Santander (Tamaulipas) in April, in 1817 and fought for seven months until his capture by royalist forces in November 1817.$^{:55–58}$
Two insurgent leaders arose: Guadalupe Victoria (born José Miguel Fernández y Félix) in Puebla and Vicente Guerrero in the village of Tixla, in what is now the state of Guerrero. Both gained allegiance and respect from their followers. Believing the situation under control, the Spanish viceroy issued a general pardon to every rebel who would lay down his arms. Many did lay down their arms and received pardons, but when the opportunity arose, they often returned to the insurgency. The royal army controlled the major cities and towns, but whole swaths of the countryside were not pacified. From 1816 to 1820, the insurgency was stalemated, but not stamped out. Royalist military officer, Antonio López de Santa Anna led amnestied former insurgents, pursuing insurgent leader Guadalupe Victoria. Insurgents attacked key roads, vital for commerce and imperial control, such that the crown sent a commander from Peru, Brigadier Fernando Miyares y Mancebo, to build a fortified road between the port of Veracruz and Jalapa, the first major stopping point on the way to Mexico City. The rebels faced stiff Spanish military resistance and the apathy of many of the most influential criollos.
The period 1816–1820 is often considered a period of military stalemate, unable to delivery a knockout blow. Insurgents often settled into guerrilla warfare with some banditry, while royalist forces became increasingly demoralized. Spain sent insufficient reinforcements, although a number of senior officers arrived. By 1814, the Peninsular War against Napoleon was won and Ferdinand VII became the monarch, initially as a constitutional ruler under the Spanish constitution of 1812, but once in power, reneged on promises to have constitutional limits on his power. Crown resources did not go toward funding the war against the insurgents, so that many expeditionary soldiers were not paid and left to their own devices in territory largely controlled by insurgents. Rather than risk life and limb fighting insurgents, they avoided risky operations and stayed close to fortified garrisons. Since money to pay and supply soldiers was not forthcoming from the crown, royal forces pressed local populations for supplies. As for high officers, many saw the hopelessness of the situation and decided to make the best of it by creating what one historian has called "veritable satrapies", becoming wealthy from confiscated insurgent properties, and taxing local merchants.
In what was supposed to be the final government campaign against the insurgents, in December 1820, Viceroy Juan Ruiz de Apodaca sent a force led by a royalist Colonel Agustín de Iturbide, to defeat Guerrero's army in Oaxaca. Iturbide, a native of Valladolid (now Morelia), had gained renown for his zeal against Hidalgo's and Morelos's rebels during the early independence struggle. A favorite of the Mexican church hierarchy, Iturbide symbolized conservative creole values; he was devoutly religious and committed to the defense of property rights and social privileges. He also resented his lack of promotion and failure to gain wealth.

## Guerrero, Iturbide, and the Plan of Iguala

Iturbide's assignment to the Oaxaca expedition in 1820 coincided with a successful military coup in Spain against the monarchy of Ferdinand VII. The coup leaders, part of an expeditionary force assembled to suppress the independence movements in the Americas, had turned against the autocratic monarchy. They compelled the reluctant Ferdinand to reinstate the liberal Spanish Constitution of 1812 that created a constitutional monarchy. When news of the liberal charter reached New Spain, Iturbide perceived it both as a threat to the status quo and a catalyst to rouse the creole elites to gain control of Mexico. Independence was achieved when conservative Royalist forces in the colonies chose to rise up against the liberal regime in Spain; it was an about-face compared to their previous opposition to the peasant insurgency.
The royalist army was demoralized and the insurgents were unable to oust them. With the re-imposition of the Spanish Constitution, the relationship between newly elected town councils (ayuntamientos) and the military meant that councils could put limits on taxation and many voted to cease exacting taxes to support the royalist army. Commanders lost their financial support and could no longer compel men to join militias. Militias were demobilized and men who had served outside of their native areas went home. The insurgents no longer felt the continuous pressure of the royalist military. Militia men abandoned areas where insurgents were active.
With the situation changed in part because of the Spanish Constitution, Guerrero realized that creole elites might move toward independence and exclude the insurgents. For that reason, his reaching an accommodation with the royalist army became a pragmatic move. From the royalist point of view, forging an alliance with their former foes created a way forward to independence. If creoles had declared independence for their own political purposes without coming to terms with the insurgency in the south, then an independent Mexico would have to contend with rebels who could threaten a new nation. Iturbide initiated contact with Guerrero in January 1821, indicating he was weighing whether to abandon the royalist cause. Guerrero was receptive to listening to Iturbide's vague proposal, but was not going to commit without further clarification. Iturbide replied to Guerrero's demand for clarity, saying that he had a plan for a constitution, one apparently based on the 1812 Spanish liberal constitution. Guerrero responded that the failure of that constitution to address the grievances of many in New Spain, and particularly objected to that constitution's exclusion of Afro-Mexicans from citizenship, while according it to European whites, Indians, and mestizos.
The question of equality for all races was a key matter for Guerrero and other insurgents, many of whom had African ancestry. Iturbide accepted that important change. The two men negotiated about how the merging of the old insurgent forces and the former royalist army would occur. Iturbide wrote the final draft of the Plan of Iguala, named for the place where it was proclaimed on 24 February 1821. Iturbide proclaimed three principles, or "guarantees", for Mexican independence from Spain. Mexico would be an independent monarchy governed by King Ferdinand, another Bourbon prince or some other conservative European prince; creoles would be given equal rights and privileges to peninsulares; and the Roman Catholic Church in Mexico would retain its privileges and position as the established religion of the land.
To reach an accord that both sides would accept, the plan explicitly laid out the terms of equality. For people of mixed race, point 12 made explicit "All inhabitants of New Spain, without distinction to their being Europeans, Africans, or Indians, are citizens of this Monarchy with the option to seek all employment according to their merits and virtues." For European whites, their privileged place in Mexico was to be maintained, guaranteeing their place in existing positions in government. "All branches of the government service will remain without alteration, and that all those presently employed in politics, the church, civilian business, or the military will retain the same positions held at present." Racial designations of Mexicans and distinctions between creole and peninsular Spaniards were abolished.
After convincing his troops to accept the Plan of Iguala, Iturbide persuaded Guerrero to join his forces in support of this conservative independence movement. A new army, the Army of the Three Guarantees, was placed under Iturbide's command to enforce the plan. The plan was so broadly based that it appealed both patriots and loyalists. The goal of independence and the protection of Roman Catholicism brought together most factions. To symbolize these three guarantees of unity, religion, and independence, Iturbide adopted a green, white, and red flag; these colors are still used in the modern Mexican flag.$^{:71}$
Although the alliance of Iturbide and Guerrero resulted in the Plan of Iguala, there was not universal acclaim of the accord. A number of important insurgents, including Juan Álvarez, Pedro Ascensio [es] and Gordiano Guzmán [es] rejected it. Guzmán articulated his objection to the plan, saying that it guaranteed the privileges of the elites, welcomed opportunists who supported independence late in the struggle, and cast doubt on the clause that was to guarantee racial equality. He focused on the final words that guaranteed rights "according to their merits and virtues". Álvarez, Ascencio and Guzmán declined to join the Army of the Three Guarantees, the military force created by Iturbide and Guerrero, but did continue to fight the royalists.

## Collapse of imperial rule and independence

Iturbide persuaded royalist officers to change sides and support independence as well as the mixed race old insurgent forces. For some royalist commanders, their forces simply left, some of them amnestied former insurgents. The high military command in Mexico City deposed the viceroy, Juan Ruiz de Apodaca in July 1821, replacing him with an interim viceroy, royalist general Francisco Novella. By the time that Juan O'Donojú became the new viceroy, practically the whole country supported the Plan of Iguala. Most soldiers had defected to Iturbide's Army of the Three Guarantees and the Spanish cause was lost. On 24 August 1821, representatives of the Spanish crown, including the new viceroy Juan O'Donojú and Iturbide signed the Treaty of Córdoba, which recognized Mexican independence under the Plan of Iguala. O'Donojú then resigned as viceroy. The Spanish government denied that O'Donojú had the authority to sign the treaty, but events on the ground saw Iturbide and the Army of Three Guarantees march into Mexico City in triumph on 27 September 1821. The next day, the Mexican independence was proclaimed in the Declaration of Independence of the Mexican Empire. The Plan of Iguala and the Treaty of Córdoba had rapidly brought about an alliance of insurgents and former royalists turned autonomists resulting in the rapid achievement of independence virtually without further military conflict. Once independence was achieved, the fissures between different interests rapidly re-emerged.

## Creation of the First Mexican Empire

On 27 September 1821, the Army of the Three Guarantees entered Mexico City, and the following day Iturbide proclaimed the independence of the Mexican Empire, as New Spain was henceforth to be called. The Treaty of Córdoba was not ratified by the Spanish Cortes. Iturbide included a special clause in the treaty that left open the possibility for a criollo monarch to be appointed by a Mexican congress if no suitable member of the European royalty would accept the Mexican crown. Half of the new government employees appointed were Iturbide's followers.
On the night of 18 May 1822, a mass demonstration led by the Regiment of Celaya, which Iturbide had commanded during the war, marched through the streets and demanded their commander-in-chief to accept the throne. The following day, the Congress declared Iturbide Emperor of Mexico. On 31 October 1822, Iturbide dissolved Congress and replaced it with a sympathetic junta.

## Spanish attempts to reconquer Mexico

Despite the creation of the Mexican nation, the Spanish still managed to retain control of San Juan de Ulúa, a fortress complex overlooking the port of Veracruz, until it surrendered to Mexican forces on 23 November 1825. Spanish attempts to re-establish control over Mexico culminated in the 1829 Battle of Tampico, during which a Spanish invasion force was surrounded in Tampico and forced to surrender.
On 28 December 1836, Spain recognized the independence of Mexico under the Santa María–Calatrava Treaty, signed in Madrid by the Mexican Commissioner Miguel Santa María and the Spanish state minister José María Calatrava. Mexico was the first former colony whose independence was recognized by Spain; the second was Ecuador on 16 February 1840.

## Legacy

In 1910, as part of the celebrations marking the centennial of the Hidalgo revolt of 1810, President Porfirio Díaz inaugurated the monument to Mexico's political separation from Spain, the Angel of Independence on Avenida Reforma. The creation of this architectural monument is part of the long process of the construction of historical memory of Mexican independence.
Although Mexico gained its independence in September 1821, the marking of this historical event did not take hold immediately. The choice of date to celebrate was problematic, because Iturbide, who achieved independence from Spain, was rapidly created Emperor of Mexico. His short-lived rule from 1821 to 1823 ended when he was forced by the military to abdicate. This was a rocky start for the new nation, which made celebrating independence on the anniversary of Iturbide's Army of the Three Guarantees marching into Mexico City in triumph a less than perfect day for those who had opposed him. Celebrations of independence during his reign were marked on 27 September. Following his ouster, there were calls to commemorate Mexican independence along the lines that the United States celebrated in grand style its Independence Day on 4 July. The creation of a committee of powerful men to mark independence celebrations, the Junta Patriótica, organized celebrations of both 16 September, to commemorate Hidalgo's grito and the start of the independence insurgency, and 27 September, to celebrate actual political independence.
During the Díaz regime (1876–1911), the president's birthday coincided with the 15/16 September celebration of independence. The largest celebrations took place and continue to do so in the capital's main square, the zócalo, with the pealing of the Metropolitan Cathedral of Mexico City's bells. In the 1880s, government officials attempted to move the bell that Hidalgo rang in 1810 to gather parishioners in Dolores for what became his famous "grito". Initially the pueblo's officials said the bell no longer existed, but in 1896, the bell, known as the Bell of San José, was taken to the capital. It was renamed the "Bell of Independence" and ritually rung by Díaz. It is now an integral part of Independence Day festivities.
Plans were drawn up for the commemoration of independence in 2021, as well as the establishment of the Mexican republic in 2024. The 2021 event was termed the Consummation of Independence.