On October 9, 1820, Guayaquil became the first city in Ecuador to gain its independence from Spain. The people were very happy about the independence and celebrated, which is now Ecuador's independence day, officially on May 24, 1822. The rest of Ecuador gained its independence after Antonio José de Sucre defeated the Spanish Royalist forces at the Battle of Pichincha, near Quito. Following the battle, Ecuador joined Simón Bolívar's Republic of Gran Colombia, also including modern-day Colombia, Venezuela and Panama. In 1830 Ecuador separated from Gran Colombia and became an independent republic.