General Vara de Rey was born in Ibiza in the Balearic Islands in 1840. He graduated as a second lieutenant from the Colegio general, ascending to the rank of first lieutenant in 1862. He fought against uprisings in Cartagena and Valencia and against the Carlists. He requested a transfer to the Philippines in 1884 where he remained until 1890 having served as Captain General of the Philippines and governor of the Mariana Islands.
Upon his return to Spain, he became commander of the garrison at Avila until April 1895 when he volunteered for service in Cuba. He was the military commander of Bayamo and commanded the regiment that fought in the battle of Loma de Gato where José Maceo, brother of Antonio, was slain and for which he was made brigadier general. Thanks to the courage of Vara de Rey and the 500 men under his command, U.S. troops were unable to take El Caney, despite the fact that they outnumbered the Spanish ten to one. Brigadier General Henry Lawton finally took the town when Vara de Rey was killed while being carried off the field with wounds in both legs.