Castilla de Oro (or del Oro) was the name given by the Spanish settlers at the beginning of the 16th century to the Central American territories from the Gulf of Urabá, near today's Colombian-Panamanian border, to the Belén River. Beyond that river, the region was known as Veragua, and was disputed by the Spanish crown and the Columbus family. The name "Castilla de Oro" was made official in May 1513 by King Ferdinand II of Aragon, then regent of the Crown of Castile.
After Vasco Núñez de Balboa's discovery of the Pacific Ocean, Castilla de Oro's jurisdiction was broadened to include the Pacific coasts of Panama, Costa Rica, and Nicaragua.
With the creation, in 1527, of the Province of Nicaragua, which included today's Nicaragua as well as the Nicoya Peninsula, Castilla de Oro's jurisdiction was reduced. In 1537, once the conflict between the crown and the Columbus family was settled, Castilla de Oro was split up, divided by the Duchy of Veragua.
The western portion, which comprised most of Panama's and Costa Rica's Pacific coasts, was merged in 1540 with Royal Veragua, to create the Province of Nuevo Cartago y Costa Rica.
The eastern part, the last remnant of Castilla de Oro, in time became known as the Realm of Tierra Firme, or Panamá, especially after the creation of the Royal Academy of Panamá in 1538. In 1560, the new Province of Veragua, created by Philip II out of the now defunct Duchy of Veragua, was merged with Castilla de Oro.