Battle of Maipú Battle of Maipú The Battle of Maipú () was a battle fought near Santiago, Chile on April 5, 1818 between South American rebels and Spanish royalists, during the Chilean War of Independence. The Patriot rebels led by Argentine general José de San Martín effectively destroyed the Spanish forces commanded by General Mariano Osorio, and completed the independence of the core area of Chile from Spanish domination. In 1817, the Argentine General José de San Martín led an army across the Andes and defeated the Spanish at the battles of Chacabuco and Chalchuapa and captured Santiago. The Spanish viceroyalty sent a
José Bernardo de Tagle y Portocarrero, Marquis of Torre Tagle member of the triumvirate under José de La Mar. In January 1823, the congress appointed him president, but a military mutiny deposed him and proclaimed José de la Riva Agüero president on 28 February. After the deposition of Riva Agüero and his retreat to Trujillo, Torre Tagle was appointed president by Antonio José de Sucre on 20 July, and elected by the congress on 16 August, and Bolivar, who on his arrival 1 September had been proclaimed dictator, left him in charge of the government. During his tenure, the Peruvian flag, which had been established by José de San Martín,