From then on the long independence struggle, was led mainly by Bolívar and Francisco de Paula Santander in neighboring Venezuela. Bolívar returned to New Granada only in 1819 after establishing himself as leader of the pro-independence forces in the Venezuelan llanos. From there he led an army over the Andes and captured New Granada after a quick campaign that ended at the Battle of Boyacá, on August 7, 1819. (For more information, see Military career of Simón Bolívar.)
That year, the Congress of Angostura established the Republic of Gran Colombia, which included all territories under jurisdiction of the former Viceroyalty of New Granada. Bolívar was elected first, president of Gran Colombia and Santander, vice president.
As the Federation of Gran Colombia was dissolved in 1830, the Department of Cundinamarca (as established in Angostura) became a new country, the Republic of New Granada.