When the War of the Pacific between Chile against Bolivia and Peru began on 5 April 1879, Miguel Grau was aboard the Huáscar, as its captain and the Commander of the Navy. In an impressive display of naval mastery, Capitán Grau played an important role by interdicting Chilean lines of communication and supply, damaging, capturing or destroying several enemy vessels, and bombarding port installations. Grau's Huáscar became famed for moving stealthily, striking by surprise and then disappearing. These actions put off a Chilean invasion by sea for six months, and as a result he was promoted to Rear Admiral by the government in Lima - the first Peruvian to be promoted to flag officer rank in many years.