The conflict culminated with American intervention during the Spanish–American War. Spain signed a peace treaty giving the United States control of Cuba, Puerto Rico, the Philippine Islands, and Guam. Cuba, however, became an independent country rather than a U.S. territory.