Spanish expeditions led by Columbus and Alonso de Ojeda reached the coast of present-day Venezuela in 1498 and 1499. The first colonial exploitation was of the pearl oysters of the "Pearl Islands". Spain established its first permanent South American settlement in the present-day city of Cumaná in 1502, and in 1577 Caracas became the capital of the Province of Venezuela. There was also for a few years a German colony at Klein-Venedig.
The 16th- and 17th-century colonial economy was centered on gold mining and livestock farming. The relatively small number of colonists employed indigenous farmers on their haciendas, and enslaved other indigenous people and, later, Africans to work in the mines. The Venezuelan territories were governed at different times from the distant capitals of the Viceroyalties of New Spain and Peru.
In the 18th century, cocoa plantations grew up along the coast, worked by further importations of African slaves. Cacao beans became Venezuela's principal export, monopolized by the Compañía Guipuzcoana de Caracas. Most of the surviving indigenous people had by then migrated to the south, where Spanish friars were active. Intellectual activity increased among the white Creole elite, centered on the university at Caracas. The Province of Venezuela was included in the Viceroyalty of New Granada in 1717, and became the Captaincy General of Venezuela in 1777.
The independence struggle began in 1810 while Spain was engaged in the Peninsular War. The Venezuelan War of Independence ensued. The Republic of Gran Colombia became independent from Spain in 1821 under the leadership of Simón Bolívar, and Venezuela separated from that Republic in 1830.