To be fair, Cocos island is tiny, even if it is quite interesting.
The island has been claimed by Costa Rica since the 1830's, and for most of that time has either remained uninhabited, or as sparsely populated as makes no difference. In the 1880's, the Coasta Rican government sponsored the creation of a small colony on the island, and even appointed a governor, though that settlement was eventually abandoned in 1908. Today, Cocos is one large, insular national park, with a permanent population of 33 (all park rangers), and is administered as part of Puntarenas Province.
The island even comes with a buried treasure myth; the Treasure of Lima. Supposedly smuggled out of Lima by the Spanish authorities as the rest of Peru slipped from their grasp in 1820, the treasure was stolen by the captain of the ship tasked with taking it to safety in Mexico. The treasure was allegedly buried on Cocos island for safekeeping by the mutineers, though their ship was caught and most of the crew executed soon after. The treasure is valued at £160 million in today's money, and is said to include jeweled stones, candlesticks, and two life-size solid gold, gem-encrusted statues of Mary holding the baby Jesus.
The 1880 settlement was actually an attempt to look for that treasure; the colonists dug a complex network of tunnels (some of which can still be visited today), but over 20 years only found 6 small gold coins for their troubles.
Needless to say, the island is still a magnet for treasure hunters.
Actually, while we're on the topic of small Pacific islands, have another patch; Gorgona Island (conspicuously absent from all maps I've checked so far), another isolated insular national park, though this one did a stint as Colombia's Alcatraz from the 50's to the 80's;