As the philosophical and political movement known as the Enlightenment swept both Europe and North America during the late 1700s and the 1800s, Spain moved to improve Puerto Rico's economy through its local government. The island's defenses were beefed up, roads and bridges were built, and a public education program was launched. The island remained a major Spanish naval stronghold in the New World. Immigration from Europe and other places more than tripled the population. It was during this era that Puerto Rico began to develop a unique identity of its own, a native pride, and a consciousness of its importance within the Caribbean.
The heavily fortified city of San Juan, the island's civic centerpiece, remained under Spain's rigid control. Although it was the victim of an occasional pirate raid, or an attack by English or French forces, the outlying countryside was generally left alone to develop its own local power centers. The city of Ponce, for example, flourished under the Spanish Crown's lax supervision and grew wealthy from the tons of contraband and the high-quality sugar that passed through its port. This trend was also encouraged by the unrealistic law that declared San Juan the island's only legal port. Contemporary sources, in fact, cite the fledgling United States as among the most active of Ponce's early contraband trading partners.