The Clericalists were initially led by Miguel Hidalgo y Costilla, who had been known as the "conscience of the revolution" during the Mexican War of Independence. When Federalist leader José María Morelos succeeded to the presidency after the death of the Count of Revillagigedo early in 1806, Hidalgo left Mexico City and launched an uprising after his supporters ambushed a force of government soldiers at the Battle of Cuautla on 14 April 1806.
Although the Clericalists controlled much of northern Mexico and had had allies throughtout the rest of the country, they lacked the resources to mount a major attack on Mexico City, and were forced to rely on guerrilla tactics. After Hidalgo's death in 1809, the Clericalists were led by Simón Figueroa, who had little military ability and was mainly known for issuing long denunciations of the Federalists. He proved to be a genius at concealment, however, and the government troops were unable to defeat them. The Clericalists became known as the Figueroaistas.
In 1815, Morelos became impatient with the Clericalists' guerrilla raids, and began a major campaign to defeat them, declaring that anyone found aiding the Clericalists would be summarily executed. Morelos' troops embarked on a killing spree, entering an area's urban centers and killing wherever they went. The deaths reached a peak in March 1816 when, according to Figueroa, over 5,000 peasants were killed by the Federalists.
In response to the killings, the government of Jefferson, led by Alexander Hamilton, chose to intervene in the civil war on the side of the Clericalists. An army under General Horatio Conyers crossed the Rio Grande in July 1816. Conyers was killed in the initial battle with the Federalists, and Colonel Andrew Jackson took command of the Jeffersonians. After defeating the main Federalist army under General Carlos Mejía in November, Jackson was able to link up with Figueroa's army and enter Mexico City on 6 February 1817.
After becoming President of Mexico, Figueroa's supporters began carrying out mass executions of Federalists. Jackson intervened in June, having Figueroa arrested and naming himself head of a provisional government. Jackson left Mexico City for Jefferson in the summer of 1818 after being nominated for Governor of Jefferson. In his absence, there was a coup attempt by the surviving Federalists on 1 February 1819, and Jackson returned on 4 May.
Jackson was able to organize the Mexico City Convention to engineer a union of Mexico and Jefferson, with delegates including former Figueroaistas as well as members of the Jeffersonian Chamber of Representatives. The convention, following Jackson's lead, drafted the Mexico City Constitution, which established the United States of Mexico. Clericalist leader Agustín de Iturbide was critical of the Constitution, but he recognized that Jackson was unstoppable, and was eventually able to gain a position in Jackson's government as Secretary for Religions.