William Rufus Shafter was teaching school in his home state of Michigan when the Civil War began. He accepted a commission with a Michigan volunteer unit and by war's end, he had earned the rank of brigadier general of volunteers. After the war, Shafter served on the frontier as a lieutenant colonel and by May 1897 he was a brigadier general, commanding the Department of California.
Shafter experienced considerable bad luck in the Spanish American war. In May 1898 he became major general of volunteers and given command over the Fifth Corps, containing most of the Army's regular troops and volunteer companies like the Rough Riders. Initially, he was ordered to make ready a reconnaissance force to work with the Cuban insurgents, but avoid actual fighting. But when Admiral Pascual Cervera's squadron left Spain, Admiral Sampson needed every available vessel to form his blockade of the harbor and had to cancel plans to carry Shafter's troops.
On May 9, Shafter was ordered to prepare for an attack on Mariel as a preliminary step to an attack on Havana. By the time the 25,000 troops could actually set sail, there were only vessels to hold 17,000, the regular soldiers, the Rough Riders, and two other regiments of volunteers. When the men arrived at Daiquirí and later Siboney, their disembarkation was similarly disorganized. Under orders to capture Santiago, Shafter's men marched relentlessly ahead on the narrow road in the tropical heat without enough medical supplies or food.
On July 1, Shafter's troops went up against the Spanish at El Caney and San Juan. Unexpectedly, the Spaniards put up a formidible resistance in a bloody and lengthy encounter. Had Shafter attacked again the following day, he would have taken the city; instead, sick with gout and unable to command, he waited until Santiago surrendered. His next task was to evacuate sick troops from Cuba to Camp Wikoff in Long Island. By the end of August, the entire Fifth Corps had left Cuba. Shafter proclaimed its disbanding on October 3. Some of his underlings vented their grievances against their leader in the press when they revealed that he had been unable to lead the troops at the battle at Santiago.