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 that it was not possible to defend Concepción, so he ordered O'Higgins to leave the city. 50,000 Chileans took cattle and grain and moved north, burning everything else, so that they did not leave supplies for the royalists. As he had done with the Tucumán Congress, San Martín urged a declaration of independence, to legitimize the government and the military actions. The Chilean Declaration of Independence was issued on 18 February 1818, one year after the battle of Chacabuco. San Martín, Las Heras and Balcarce met in Curicó, and the royalists in Talca, in a plain known as "Cancha rayada".