Simon Bolivar launched his campaign from the north, liberating the Viceroyalty of New Granada in the Battles of Carabobo in 1821 and Pichincha a year later. In July 1822, Bolivar and San Martin gathered in the Guayaquil Conference. Bolivar was left in charge of fully liberating Peru while San Martin retired from politics after the first parliament was assembled. The newly founded Peruvian Congress named Bolivar dictator of Peru, giving him the power to organize the military.