First Mexican Republic
Independence was finally gained in 1821 under Agustín de Iturbide's Plan of Iguala which was a conservative reaction against the outbreak of the Trienio Liberal in Spain, but also an agreement with those Mexican liberals who searched for equality before the law. Mexico was to have its independence under a commonwealth system with constitutional monarchy maintaining ties to Spain and government workers in charge were sent to Spain to offer the throne to a Spanish prince. The Spanish government refused the offer and a popular demonstration led to Iturbide himself assuming the throne. The Emperor immediately however began to disagree with the government and showed himself determined to have supreme authority over the government, even shutting congress down and replacing it with a body of loyalists. Iturbide struggled to pay the army, and eventually Santa Anna said in favor of a Federal Republic in his Plan of Casa Mata. After being unable to hold back the rebellion Iturbide met again congress and offered his giving up after which he was permanently removed from the nation. He would attempt to return the following year while Mexico was under a temporary government only to be captured and executed.