At the Battle of Junín his cavalry was largely responsible for the defeat of the Spanish and at the Battle of Ayacucho his initiative in launching an attack at a critical moment, without waiting for Sucre's orders, was decisive in securing victory. During these wars Miller was wounded twenty two times, and after his death the autopsy revealed he had carried two bullets in his liver for 40 years.