A law student, he began his military career at the young age of eighteen, following the establishment of juntas in 1810, which began the process of independence in New Granada. Santander enlisted in the revolutionary army in October 1810, in the battalion the National Guard ("Guardias Nacionales"). He first served as a soldier in army of the federalist United Provinces of New Granada, under the command of General Antonio Baraya, that fought against General Antonio Nariño, of the Province of Cundinamarca, who had refused to recognize the authority of the Union. During these campaigns Santander achieved the rank of colonel in 1812. After the royalist forces re-conquered New Granada, Santander like many other New Granadan officers retreated to the plains east of the Cordillera Oriental, the Llanos, near the modern Venezuelan border. There, Santander joined forces with Venezuelan patriots and operated under the command of Simón Bolívar. During the military campaign across the Andes, Bolívar promoted Santander to Brigadier General in 1817.