On April 28, 1898, General Rabí seconded General Calixto García in taking the city of Bayamo. Shortly after, the US military intervention in the Cuban war of independence took place. Rabí, as second to General Calixto, participated with his troops and the US troops in the Battles of El Caney and San Juan Hill, in the summer of 1898.