After several centuries of Spanish rule, and after fierce battles, the people won their freedom from Spain in the Battle of Boyacá, where on August 7, 1819, troops under the command of Simón Bolívar defeated the Spanish forces.