Answer
Argentina, Chile, and Peru gained their independence from Spanish rule thanks to the military campaigns led by General José de San Martín, a prominent figure in the South American wars of independence. Through strategic military maneuvers and decisive victories, San Martín played a crucial role in liberating these countries and contributing to the establishment of their sovereignty.