Puerto Rico was ceded by Spain in the aftermath of the Spanish–American War under the terms of the Treaty of Paris of 1898 and became a territory of the United States. In 1899, the United States conducted its first census of Puerto Rico finding that the population of Barceloneta was 9,357.