Later, Spain and the United States signed the Adams-Onís Treaty on February 22, 1819. The treaty established boundaries between the United States and New Spain, which had been in dispute since the Louisiana Purchase. The U.S. obtained Florida and renounced its claim to Texas. Spain renounced its claim to the Oregon Country. The previous viceroy, Calleja, had established a fort in the old tobacco warehouse in Mexico City, named La Ciudadela. Apodaca converted it into a storehouse for arms and munitions, but these were slowly being pilfered. He ordered Brigadier Francisco Novella to take charge of La Ciudadela and stop the thievery. Novella considered that task beneath his dignity, and was able to enlist the support of the Audiencia. The incident made Novella an enemy of Ruiz de Apodaca, and it was Novella who later deposed and replaced him in 1821. The Plan de Iturbide On January 1, 1820, Colonel Rafael del Riego rose in rebellion in Andalusia, Spain, demanding the restoration of the Constitution of 1812. Ferdinand VII was forced to reinstate the constitution on March 9, 1820 in Spain and all of the Spanish possessions. When the order arrived in New Spain, Apodaca delayed its publication pending the outcome of secret negotiations being carried out in the church of La Profesa. On March 7, 1821, the negotiators agreed on a declaration of independence for New Spain, accompanied by an offer to Ferdinand VII to rule as an absolute monarch, without mention of a constitution. For this plan to succeed, the support of the military was necessary. To that end, the viceroy chose General Agustín de Iturbide to represent the cabal, at the same time freeing him from a court case involving accusations of misbehavior at El Bajío. The plan, ironically as it turned out, became known as the Plan de Iturbide. Iturbide had been given command of royalist troops in the south of the country on November 9, 1820. In the meantime Apodaca instituted the Constitution of 1812 on May 31, 1820. The Plan de Iguala In pursuit of his own ambitions, Iturbide corresponded with and then met with the insurgent general he was sent to fight, Vicente Guerrero on February 10, 1821. The two of them agreed to declare the independence of Mexico. This agreement was announced March 2, 1821, in the town of Iguala in the present state of Guerrero. This agreement became known as the