The transition from Hapsburg Spain to Bourbon Spain saw the end of the great European continental empire that Spain held and the territorial expansion of its empire in the Americas. To Austria Spain ceded what was left of the Spanish Netherlands (essentially Belgium), and in Italy: Naples, Milan and Sardinia. To the Duchy of Savoy it yielded the rest of its Italian possessions. To Great Britian it surrendered Gibraltar and Minorca, although it would later regain Minorca, Gibraltar is still under British possessio, although Spain has not formally surredered its claim.
Thus the Spanish frontier in the 18th century was now terriroty that makes up much of the western and southwestern United States. Spanish claims in the Americas on its fringe what is now Pacific Northwest found rivals in Russia, Great Britain and France. Texas, Colorado, Nevada Utah, California, New Mexico, Arizona and parts of Oklahoma, Missisiipi, Alabama, and Florida.
In the 1762 France ceded Louisiana to Spain and it was part of Spani until Napoleon took it back in the 19th century and sold it to the Untied States, thus in the latter half of the 19th century, the vast area of what would become the Louisiana Purchase was added to the territory of New Spain.
East and West Florida were lost to Great Britain in 1763 in the treaty of Paris, but was regained in 1783, only to be sold via extortion to the United States in the 19th century. As mentioned, Louisana would be lost to Spain in 1803 and the rest of Spanish America in what is now the United States became part of Mexico after 1821
The early 19