The Spanish–American War was a conflict in 1898 between Spain and the United States, effectively the result of American intervention in the Cuban War of Independence. American attacks on Spain's Pacific possessions led to involvement in the Philippine Revolution and ultimately to the Philippine–American War.
Revolts against Spanish rule had occurred for some years in Cuba. There had been war scares before, as in the Virginius Affair in 1873. In the late 1890's, American public opinion was agitated by anti-Spanish propaganda led by journalists such as Joseph Pulitzer which used yellow journalism to criticize Spanish administration of Cuba. After the mysterious sinking of the American battleship Maine in Havana harbor, political pressures from the Democratic Party and certain industrialists pushed the administration of Republican President William McKinley into a war he had wished to avoid. Compromise was sought by Spain, but rejected by the United States which sent an ultimatum to Spain demanding it surrender control of Cuba. First Madrid, then Washington, formally declared war.