At the start of the War with Spain in 1898, the 5th Infantry was ordered to guard duty at ports and military facilities on the coast of
South Carolina. The regiment was later ordered to the
Tampa, Florida port of embarkation, where Shaw was assigned as quartermaster and commissary officer of the Independent Regular Brigade commanded by
Theodore Schwan. When Schwan's brigade was ordered to
Puerto Rico, Shaw took part in the subsequent campaign, including combat at
Hormigueros. Shaw subsequently reported to the 5th Infantry during the
occupation of Cuba, where he discovered that he had been promoted to
first lieutenant and assigned to the
19th Infantry in Puerto Rico. Upon returning to Puerto Rico, Shaw found that his new regiment had been ordered to the
Philippines. He served there from 1899 to 1901, including participation in the 1899 to 1900
Panay campaign of the Philippine Insurrection. ==Interwar period==