information:highlighting, structural:summarization, linguistic:translation, linguistic:paraphrasing
Final years: 1826–1830

Bolívar arrived in Guayaquil on 13 September 1826 and heard complaints against Santander's governance from the people of Guayaquil and Quito, who declared him their dictator. From Ecuador, he continued north and heard more complaints, promoted civil and military officers, and commuted prison sentences. As he approached Bogotá, Bolívar was met by Santander, who hoped to persuade Bolívar to his cause in the conflict with Páez. Although Santander was annoyed at Bolívar for his desire to return to power and ratify a version of the Bolivian constitution in Colombia, they reconciled and agreed that Bolívar would resume the presidency of Colombia; congress had reelected them to a second four-year term beginning on 2 January 1827. Bolívar arrived in Bogotá on 14 November 1826.

On 25 November, Bolívar left Bogotá with an army supplied by Santander and arrived at Puerto Cabello on 31 December, where he issued a general amnesty to Páez and his allies if they submitted to his authority. Páez accepted and in January 1827, Bolívar confirmed Páez's military authority in Venezuela and entered Caracas with him to much jubilation; for two months, Bolívar attended balls celebrating his return and the amnesty. That amnesty, and clashes over Santander's handling of Colombia's finances, caused a break between Bolívar and Santander that became an open enmity in 1827. In February 1827, Bolívar submitted his resignation from the Presidency of Colombia, which its congress rejected. Meanwhile, the Colombian soldiers garrisoned in Lima mutinied, arrested their Venezuelan officers, and occupied Guayaquil until September 1827, allowing Bolívar's opponents in Peru to depose him as president and repeal his constitution.

Bolívar departed Venezuela to return to Bogotá in July 1827. He arrived on 10 September with an army he had gathered at Cartagena and secured the calling of a new congress to meet at the city of Ocaña in early 1828 to modify the Colombian constitution. The elections for this congress were held in November 1827 and, as Bolívar declined to campaign because he did not wish to be perceived as personally influencing the elections, were very favorable to his political opponents. In January 1828, Bolívar was joined in Bogotá by Sáenz, but on 16 March 1828 he left the capital after being informed of a Spanish-backed rebellion in Venezuela. As that revolt was crushed before he arrived, Bolívar turned his attention to the occupation of Cartagena by José Prudencio Padilla, a New Granadan admiral and Santander loyalist. Padilla's rebellion was also crushed before Bolívar arrived, however, and he was arrested and imprisoned in Bogotá. As the Convention of Ocaña opened on 9 April, Bolívar based himself at Bucaramanga to monitor its proceedings through his aides.

The convention appeared likely to adopt a federalist system. To prevent this, on 11 June 1828 Bolívar's allies staged a walkout, leaving the convention without a quorum. Two days later, Pedro Alcántara Herrán, a Bolívar loyalist and the governor of New Granada, called a meeting of the city's elite that denounced the Convention of Ocaña and called on Bolívar to assume absolute power in Colombia. Bolívar returned to Bogotá on 24 June and on 27 August assumed supreme power as the "president-liberator" of Colombia, abolished the office of the vice president, and assigned Santander to a diplomatic posting in Washington, D.C. On 25 September 1828, a group of young liberals that included Santander's secretary made an attempt to assassinate Bolívar and overthrow his government. The attempt was thwarted by Sáenz, who bought time for Bolívar to escape as the assassins entered the Palacio de San Carlos, and the Colombian Army. Bolívar spent the night hiding under a bridge until soldiers loyal to his regime rescued him.

In the aftermath of the attempted coup, Santander and the conspirators were arrested. Bolívar, depressed and ill, considered resigning from politics and pardoning the conspirators, but was dissuaded from this by his officers. Padilla, though uninvolved with the attempted coup, was executed for treason for his earlier rebellion; Santander, whom Bolívar thought responsible for the plot, was pardoned but exiled from Colombia. In December 1828, Bolívar left Bogotá to respond to Peru's intervention in Bolivia and invasion of Ecuador and a revolt in Popayán and Pasto led by José María Obando. He left behind a council of ministers led by Urdaneta to govern Colombia and announced that a congress would convene in January 1830 to devise a new constitution. Over 1829, Obando was defeated by Colombian general José María Córdova at Bolívar's direction in January and then pardoned, while Sucre and Venezuelan general Juan José Flores defeated the Peruvians at the Battle of Tarqui in February, leading to an armistice in July and then the Treaty of Guayaquil in September.

While Bolívar was away, Urdaneta and the council of ministers planned with French envoys to have a member of the House of Bourbon succeed Bolívar on his death as King of Colombia. This plan was widely unpopular, and inspired Córdova to launch a revolt that was crushed in October 1829 by Daniel Florence O'Leary, Bolívar's aide-de-camp. In November, Bolívar ordered the council to cease its planning; instead they resigned. Venezuelans, encouraged by a circular letter Bolívar had published in October, voted to secede from Colombia. On 15 January 1830, Bolívar arrived in Bogotá and on 20 January the Admirable Congress convened in the city. Bolívar submitted his resignation from the presidency, which the congress did not accept until 27 April, following the appointment of New Granadan politician Domingo Caycedo as interim President.