On February 13, 1817, San Martín, O’Higgins, and their army successfully entered Santiago, Chile, after crossing 500 kilometers of mountain range, and the journey came to an end. The royalist forces, by this time, had advanced north to avoid San Martín's army, but a royalist leader had stayed behind with 1,500 men to advance at a valley called Chacabuco, which was located near Santiago. Thus, the Battle of Chacabuco began.