However, eventually, the French, Portuguese, and British tried to undermine the Spanish monarchy. Starting in the second half of the 17th century, the Spanish Empire began to suffer bankruptcies, and its military began to lose battles. In the 19th century, Spain lost its last major territories overseas in the Spanish-American War.