This post may contain affiliate links. We may earn money or products from the highlighted keywords or companies or banners mentioned in this post.

Panama's Isla Coiba bears all the hallmarks of a perfect desert island: gin-clear water, powdery white sand, a fringe of palm trees against a backdrop of dense, unexplored rainforest. When I arrived on the island, the peaceful beach was scattered with a handful of travellers bobbing in the bath-warm water or taking lazy afternoon naps on the salt-encrusted hammocks.

It was hard to imagine that this island paradise harboured such a dark past – or has such an uncertain future.

For almost a century, Isla Coiba – which along with 38 other protected islands forms Coiba National Marine Park – was home to a notorious island prison, rumoured to be where the country's most dangerous criminals were sent and where political prisoners disappeared. With the island home to various poisonous snakes and insects and surrounded by shark-infested waters, there was no hope of escape for the thousands of prisoners, known as Los Desaparecidos (The Missing).

Over the last century, Panama has undergone – and continues to undergo – enormous environmental change. But in Coiba, a lack of human interference means that nature has been able to thrive. About 80% of Coiba’s rainforest, which is Central America's largest at 194sqkm, is virgin, and in 2005, shortly after the jail was shut down, the national park was declared a Unesco World Heritage site.

A lack of human interference means that nature has been able to thrive.

Coiba's biodiversity is a huge draw for both scientists and nature-loving travellers. There are a high number of indigenous mammals, birds and plants, and the island is a last refuge for some endangered species, such as the crested eagle and scarlet macaw. Situated on the same underwater mountain range as the Galapagos Islands, Coiba also has very diverse marine life. Coral has formed reefs on top of volcanic rock, and the waters serve a migratory corridor for rays, turtles, pelagic fish, dolphins, whale sharks and humpbacks.

I was drawn to Coiba because of its reputation as one of the world’s most thrilling places to dive. Unlike the Galapagos ­– or Malepo in Colombia or the Cocos Islands in Costa Rica, both renowned diving destinations on the same underwater mountain range – it is possible to take day trips to Coiba, with most visitors setting off from Santa Catalina, a small mainland fishing village about 20km away. In order to explore more of the marine park's dive sites, I arranged a three-day excursion with the Panama Dive Center, staying in basic accommodation in Coiba’s ranger station.

The first day's diving did not disappoint. In addition to a dazzling array of fish that included parrot fish, trumpet fish, frog fish, moray eels, jacks, groupers, barracuda and white-tip reef sharks, we also saw bottlenose dolphins and a school of pilot whales. We saw a colourful display of local wildlife on land, too. While eating lunch, a menagerie of animals assembled nearby, creeping out from the forest. As well as orange-coloured iguanas, cappuccino monkeys and vultures, I also spotted a creature that looked like a cross between a beaver and rabbit. My diving instructor David said it was a ñeques, one of the island's many endemic mammals. With such an abundance of nature, I wondered if Isla Coiba was like Dr Moreau's, with all sorts of beast folk lurking within the unexplored rainforest.

The second day was a touch more dramatic than the first. Looking out to sea early in the morning I spotted an enormous cruise ship – an increasingly common sight in the park. Coiba’s sleepy beach quickly became a hive of activity, as dozens of cruise staff set out sun loungers, shades, towels, water-sports gear, a barbeque station and a bar. Speedboats then ferried about 150 guests from the ship to the island for the day. Little did the guests know that their advertised “desert island experience” would turn into more of a Robinson Crusoe-style affair after they left.

Returning to the island for lunch after a couple of morning dives, I learned that the Star Pride cruise ship wouldn't be leaving mid-afternoon as planned. It had in fact run aground on the reef that morning and had holes in its hull.

As the day progressed the cruise ship was noticeably tilting, and over the series of several huddles the captain explained to the guests they would be picked up by another ship that night. I decided to do a light trek into the rainforest to escape the furore on the beach.

After a sweat-drenched ascent, I reached a vista point where I was able to take in the vast scope of the marine park and its many islands. The line between the sea and hazy sky was barely visible, making the sight of a leaning cruise ship plonked in the middle of it all the more incongruous.

Back on the beach, some guests made the best of the situation, enjoying the resulting free drinks and food. But some tempers frayed and others worried about valuables and medication they had left on the boat. In an attempt to placate the situation, one guest strolled up and down the beach singing along with his guitar. I'm not sure at this point if the guests knew about the sandflies that descend on the beach after sunset, or the crocodiles that patrolled it.

I left the chaos again to do a night dive, plunging into the water at dusk when the sky was a milky lilac and emerging almost an hour later to complete darkness. As we returned to the island, the saviour ship was picking up the stranded guests, its lights twinkling like Panama City's flashy skyline.

The guests were gone by about midnight; the original ship was left behind, I learned, for the next couple of weeks. Staff came the following morning to pick up the rubbish that covered the sand and was being picked at by vultures. It was a relief to return to the tranquillity I’d experienced the first day.

The island’s growing popularity on the cruise-ship circuit is a concern.

The island’s growing popularity on the cruise-ship circuit is a concern for many. With a limited water supply and waste disposal, the island cannot sustain such large volumes of visitors. Camilo Consuegra, owner of Panama Dive Center, explained that there are no restrictions on the number of guests that can visit the island. While permits are required for an overnight stay, anyone can come here on a day trip. “At Coiba National Park, the responsibility to handle or control the activities has been deposited on the tour operators, which, I think, is a complete mistake,” he said. Maintenance of the island's facilities, fishing control in remote areas of the marine reserve and tourism education for the rangers “are crucial for the sustainability of this beautiful park”.

On our last day, we took a break on another one of Coiba's picture-perfect islands: Isla Rancheria, a Smithsonian Institute outpost for scientific research. There was a sign warning about crocodiles, but the most menacing creature I spotted was a hermit crab, crisscrossing the sand. Under a canopy of trees, which threw finger-shaped shadows on to the sand, I rested, eating a freshly fallen coconut.

Even with the growing crowds and the abundant wildlife, it was easy to find solace in this special park.  While it’s the past lack of human interference that has enabled the park to flourish, it is now up to the visitors, local businesses, scientists, conservationists and Panama’s parks authority to ensure it remains this way for future generations to enjoy.

If you liked this story, sign up for the weekly bbc.com features newsletter, called “If You Only Read 6 Things This Week”. A handpicked selection of stories from BBC Future, Earth, Culture, Capital, Travel and Autos, delivered to your inbox every Friday.