Villegas decided to join the army and enlisted in the ranks of the "Chorolque" battalion in Potosí, part of the Fifth Division, which left Cotagaita on October 11, 1879, under the command of General Narciso Campero.
Promoted to sublieutenant standard-bearer on May 2, 1880, he had his baptism of fire in the Battle of el Alto de la Alianza, where he fought until he was seriously wounded and captured.
[1][2] He continued his military career until 1888 when, due to the revolution of September 8 in Sucre against President Aniceto Arce, he was forced to retired with the rank of sergeant major.
In 1909, he was appointed Adjutant General of the Ministry of War and later traveled as the Chief of the Military Commission sent to Chile when that republic celebrated its centenary of independence.
[4] While in this position, he was accused by the La Paz press of treason against the country for: "revealing secrets related to the organization of the army and delivering a copy of the war budget to the Chilean military attaché in the early days of April 1920".