Panamanian patriots voluntarily joined the old provinces of Veraguas and Panama into Gran Colombia and once it dissolved in 1830, the territory remained part of Colombia until 1903. In addition, Bolívar chose Panama to host the Amphictyonic Congress. Meanwhile, in 1824 Bolívar consolidated, with the battles of Junín and Ayacucho, the Independence of Peru, which had been initiated by José de San Martín, who in 1821 had declared independence and established the Republic of Peru.