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
Jaime Miguel de Guzmán de Avalos y Spinola, Marquis of la Mina, Duke of Palata and Prince of Masa Fernando Castle in Figueras and the reconstruction of the Montjuich fortress. He was buried in the Barceloneta "San Miguel del Puerto Church", an area much decayed along the times but now flourishing again after the 1992 Barcelona Olympic Games. At his death in Barcelona he was replaced by Irish-Spanish General Bernardo O´Connor. Jaime Miguel de Guzmán de Avalos y Spinola, Marquis of la Mina, Duke of Palata and Prince of Masa Jaime de Guzmán y Spinola, II Marquis of la Mina (1690–1767) was a Spanish Army commander and Captain General of Catalonia. He was also the Fifth Count of Pezuela