After enlisting as a cadet in the Provincial Regiment of Granada in 1762, Pérez de Herrasti transferred to the Royal Guards Corps in 1764, seeing action in Algeria in 1775.
[1] In 1794 his battalion was beaten back at the defence of Pla del Rey and Pérez de Herrasti was taken prisoner.
[1] In 1807 Pérez de Herrasti was given interim command of the 1st Battalion of his regiment and sent to Portugal,[1] returning to Spain in March 1808.
[1] That November, he saw action at Tudela and, the following month, at the combat of Tarancón where, at the head of two hundred men, he managed to repel two attacks by 800 French horse, in reward for which he was promoted to field marshal.
[2] On his return to Spain, he was promoted to lieutenant general in July 1814 and that same month appointed military governor of Barcelona, post he held at his death.