José de San Martín Manuel Rodríguez had returned to Chile before the crossing, and began a guerrilla war in Santiago de Chile against the royalists, in support of the upcoming army. He was supported in the south of the city and the countryside. The strategy was to occupy nearby villages, seize the royalists' weapons and flee. The attacks on Melipilla and San Fernando, and a failed one at Curicó, demoralized the royalists. The columns that crossed the Andes began to take military actions. The column in the north led by Cabot defeated the royalists in Salala, seized Coquimbo and then Copiapó. In the south,
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,