Simon Bolivar fought for the independence of Colombia, Venezuela, and Ecuador from Spain, uniting them into the Republic of Gran Colombia in 1819. He hoped to eventually unite all of South America but was only able to add Peru and Bolivia before conflicts arose. As president, Bolivar left Santander in charge while he fought to liberate other countries, but Venezuela and Ecuador later separated from Gran Colombia. A new constitution in 1822 based on the U.S. model established a three-branch government and guaranteed various freedoms, but political divisions weakened it over time.