In the fall of 1886, General Aguilar was the commander of the Fourth Mexican Army, stationed in Chiapas on the Guatemalan border. Following Chief of State Benito Hermión's declaration of war on 18 October 1886, Aguilar's army crossed into Guatemala. Sobel gives no details of the following campaign, only to note that Aguilar took the Guatemalan capital of Guatemala City on 15 November, 28 days later. Given that Guatemala City is only 100 miles from the Mexican border, this indicates either poor leadership by Aguilar, stubborn resistance by the Guatemalan army, or both.
The Mexican Fourth Army continued to occupy Guatemala for the next fifteen years, and Aguilar was still in command in 1890 when the War of Salvation between Mexico and New Granada began. New Granadan Premier Adolfo Camacho reacted to Hermión's increasingly bellicose rhetoric by sending the New Granadan army under General Roberto Bermúdez into Guatemala on 1 March 1890. Bermúdez occupied all of Guatemala south of the Kinkaid Canal, and remained there until the fall of the Camacho government in September. Aguilar either made no attempt to drive Bermúdez back, or was unable to do so. Bermúdez finally surrendered his army to Aguilar on 21 September 1890. Sobel makes no further mention of Aguilar.