The Spanish-American War was triggered by the explosion of the USS Maine, which killed 266 Americans. Political tensions between Spain and the U.S. had been escalating for some time and the explosion was believed to be the result of Spanish sabotage.
The USS Maine was in the harbor of Havana, Cuba when it exploded on Feb. 15, 1898. This was significant because much of the tension between the U.S. and Spain was a result of the U.S. supporting Cuba in its fight to declare independence from Spain. The initial investigation by the U.S. Navy concluded that the explosion was caused by a mine or other external explosion. However, both the Spanish investigation at the time and a 1974 U.S. investigation eventually concluded that the explosion was most likely an accident originating in the boiler room.
In 1898, the yellow press had been cultivating a strong anti-Spanish sentiment in the general population for some time. After the sinking of the Maine, the public demanded retaliation against Spain. President McKinley still attempted a diplomatic solution, but when the Spanish government refused to acquiesce to his demands, he asked Congress to declare war. The Cuban struggle for independence played a large part in the decision to go to war, and Congress passed the Teller Amendment to promise the Cubans their freedom.