This cleared the way for Bolívar and Santander to invade New Granada, where, in Pantano de Vargas, the Spaniards were defeated in a battle in which the British Legion played a central role and its commander, Rooke, was killed in action.