Bernardo O'Higgins accepted the position instead, and became the leader of an independent Chile. He was granted dictatorial powers as Supreme Director on 16 February 1817. On 12 February 1818, Chile proclaimed itself an independent republic. Throughout the war with the royalists, O'Higgins had engaged in an ongoing feud with José Miguel Carrera. After their retreat in 1814, O'Higgins had fared much better than Carrera, who found little support forthcoming from San Martín, O'Higgins' political ally. Carrera was imprisoned to prevent his involvement in Chilean affairs; after his escape, he ended up taking the winning side in the Argentine Federalist war, helping
José de San Martín Freire captured Talca. Las Heras routed royalist outposts in Juncalito and Potrerillos. Bernardo O'Higgins, who came from Los Patos pass, defeated the royalists at Las Coimas. This allowed the main columns to gather at Aconcagua valley, meeting at the slopes of Chacabuco. Royalist commander Rafael Maroto converged his armies on that location as well. Maroto had 2,450 men and 5 pieces of artillery, San Martín had 3,600 men and 9 pieces of artillery. The misdirection that concealed the path of the bulk of the Army allowed San Martín this advantage, as other royalist forces were scattered in other regions of