 Until 1849, when it became part of Panama, Chiriquí was part of Costa Rica.Costa Rican pride was assuaged for the loss of this eastern (or southern) territory with the acquisition of Guanacaste, in the north.Coffee was first planted in Costa Rica in 1808, and by the 1820s, it surpassed tobacco, sugar, and cacao as a primary export.