In 1897, faced with intense pressure from sources within Puerto Rico, a weakened Spain granted its colony a measure of autonomy, but it came too late. Other events were taking place between Spain and the United States that would forever change the future of Puerto Rico.
On February 15, 1898, the U.S. battleship Maine was blown up in the harbor of Havana, killing 266 men. The so-called yellow press in the United States, especially the papers owned by the tycoon William Randolph Hearst, aroused Americans' emotions into a fever pitch for war, with the rallying cry "Remember the Maine."
On April 20 of that year, President William McKinley signed a resolution demanding Spanish withdrawal from Cuba. The president ordered a blockade of Cuba's ports, and on April 24, Spain, in retaliation, declared a state of war with the United States. On April 25, the U.S. Congress declared war on Spain. In Cuba, the naval battle of Santiago was won by American forces, and in another part of the world, the Spanish colony of the Philippines was also captured by U.S. troops.
On July 25, after their victory at Santiago, U.S. troops landed at Guánica, Puerto Rico, and several days later they took over Ponce. U.S. Navy Capt. Alfred T. Mahan later wrote that the United States viewed Puerto Rico, Spain's remaining colonial outpost in the Caribbean, as vital to American interests in the area. Puerto Rico could be used as a military base to help the United States maintain control of the Isthmus of Panama and to keep communications and traffic flowing between the Atlantic and the Pacific.
Spain offered to trade other territory for Puerto Rico, but the United States refused and demanded Spain's ouster from the island. Left with little choice against superior U.S. forces, Spain capitulated. The Spanish-American War ended on August 31, 1898, with the surrender of Spain and the virtual collapse of the once-powerful Spanish Empire. Puerto Rico, in the words of McKinley, was to "become a territory of the United States."
Although the entire war lasted just over 4 months, the invasion of Puerto Rico took only 2 weeks. "It wasn't much of a war," remarked Theodore Roosevelt, who had led the Rough Riders cavalry outfit in their charge up San Juan Hill, "but it was all the war there was." The United States had suffered only four casualties while acquiring Puerto Rico, the Philippines, and the island of Guam. The Treaty of Paris, signed on December 10, 1898, settled the terms of Spain's surrender.