The island was a major military post during many wars between Spain and other European countries for control of the region in the 16th, 17th and 18th centuries. In 1898, during the Spanish-American war, Puerto Rico was invaded and became a possession of the United States.