The Panamanian movement for independence from the Spanish Crown began on November 10, 1821 with the events of the first call for independence in Villa de Los Santos by Rufina Alfaro and Segundo Villareal, which was supported in other cities like Natá, Penonomé, Ocú, and Parita.
The royal army in Panama City was commanded by Colonel José de Fábrega, a Creole from Veraguas. Isthmus patriots took advantage of this situation and won over Fábrega's complicity, as well as that of the patriotic societies and clergy, who contributed financially to the movement. On November 28, a Town Hall meeting was convened, where in solemn ceremony and in the presence of military, civil, and religious authorities, they declared that the bonds that had tied the Isthmus of Panama to Spain were broken. Among the leading figures in attendance were José Higinio Durán y Martell, Panama's bishop, Dr. Carlos de Icaza, Mariano Arosemena, Juan de Herrera, Narciso de Urriola, José de Alba, Gregorio Gómez, Manuel María Ayala, Antonio Planas, Juan Pío Victorias, Antonio Bermejo, Gaspar Arosemena, and Casimiro del Bal.
On November 30, 1821 the warships Trial and Revenge arrived at Panama Bay to seek out the rest of the Spanish troops. The Spanish captains José de Villegas and Joaquín de Soroa signed a peace treaty with José de Fábrega (promoted to the rank of general and appointed civil and military leader of the isthmus by Simón Bolívar) on January 4, 1822, representing the Spanish monarchy and the local patriots, respectively. The Spaniards agreed to nonaggression on the territories of the isthmus and the withdrawal of all Spanish Crown troops and ships from the new isthmus nation.
The lack of a budget, limited military weapons, and the insecurity of being a Spanish republic endangered the continued quest for independence of the isthmus. Therefore, a union with some of the new American nations was proposed, among them the neighbors of the Central American Union and the nation of Peru, which had been the Isthmus' main trading partner during the colonial period.
Nevertheless, in admiration of the leadership and vision of Simón Bolívar, The Liberator, and in consideration that the colonial isthmus had previously belonged to the Viceroyalty of New Granada, the Panamanian patriots voluntarily decided to join Gran Colombia, a large republic that encompassed what is now Colombia, Ecuador, Venezuela, and Panama.