The scent of diesel, rusting anchors and fish slurry hung in the humid air of the harbor. I was in Puntarenas on the western shore of Costa Rica, waiting to leave on a scuba-diving trip to Cocos Island - often called an "underwater Serengeti" because of the many species found there, especially the schools of scalloped hammerhead sharks.

But I was remembering that this town has a darker side: It is the shark-finning capital of Central America.

Though finning is outlawed in Costa Rica, fishing sharks is legal. In 2011, British celebrity chef Gordon Ramsay and his film crew approached fishermen here unloading shark fins; the traffickers doused the chef and crew in gasoline and forced them out of town at gunpoint. And the protected waters around Cocos Island are especially favored by shark poachers.

I moved closer to our boat's slip and met the other 17 passengers. They were from Switzerland, France, Israel, England and Texas among other places. All were serious divers. And good thing: We were headed out on a 36-hour ride in choppy seas that would take us 330 miles west to swim with the sharks.

Voyage to Isla Cocos

After the day-and-a-half journey, I awoke to see a crane lowering our dive boats from the deck of our ship, the Argo, to the water's surface. A cappuccino maker in the main room was getting a workout, and breakfast was made-to-order omelets and tropical fruit.

I hurried on deck to see Cocos Island. It's the top of a submerged volcano, with a circumference of sheer rock cliffs circled by gulls, frigates, white terns and boobies. In 1978, the island and 12 miles of seas surrounding it became a Costa Rican national park, and, in 1997, UNESCO named it a World Heritage Site.

Park rangers from the island boarded, led by Geiner Golfin, who sported a long dark beard, a camouflage cap with a Che Guevara patch, a necklace with a silver hammerhead pendant and a pistol in a shoulder holster. I had read on his Facebook page that his mantra was "Hasta La Victoria, Siempre" or "Until Victory, Always." He was talking about stopping shark poachers.

As Golfin spoke in Spanish, a translator gave the gist of the park rules: No touching the animals, no taking coral or anything else. Only a half-dozen rangers patrol the ocean sanctuary; they are outgunned and outmanned by poachers equipped with radar to warn of approaching boats. The far less dangerous part of the rangers' jobs is to keep divers from boneheaded behavior, like trying to pet the sharks. Those warnings imparted, the rangers left.

Our dive master, Jaume Pericas, told us our first dive would be shallow, only 40 feet, and mostly so we could get used to our weights and gear. We divided into two groups, boarded the small boats, and headed to a reef called Manuelita. There, we submerged to find coral reefs with creatures straight from "Finding Nemo": Polka-dotted guinea fowl puffer fish and spear-like Chinese trumpetfish swam by, a small whitetip reef shark rested on the ocean floor, an orange frogfish crept from under a rock, and schools of blue and gold snapper shimmered past.

Later, as I toweled off, my roommate, Shui from Shanghai, said, "You know, a lot of people have died here. Not from sharks, but the current grabs them and carries them off. Never seen again."

Part of learning to dive is overcoming fear of an alien environment. You have to trust your gear, keep your dive buddy in sight, read the surges and currents, and never panic and surface too quickly. And then there are the sharks.

I surf in the Bay Area's ocean, part of the so-called "Red Triangle" where great white sharks migrate every year to have their young and feed on sea lions. Statistically speaking, I knew better than to fear sharks - they kill only about five people a year, worldwide - but part of me still did. Waiting for a swell while surfing, I looked for dorsal fins. I don't like to be the only surfer in the water. I don't eat shark, in hopes of good karma. I don't wear "yum-yum yellow" in the water, a color that many believe sharks are attracted to. In California, I had not wanted to face my fears underwater. But now, far away from my surf spot, I was ready to go and take a look.

Watery Serengeti

On the next dive, we went 80 feet deep to a "shark cleaning station." Hammerhead sharks visit Cocos Island mostly to rid their skin of parasites. Small gold-and-black barber fish, the size of my hand and shaped like angel fish, school around rock pinnacles, awaiting their "customers." As sharks pass slowly by, the little fish clean them off, making the sharks healthier and able to swim faster.

Currents whipped up like underwater whirlwinds, and I clung to a rock and watched. Two marbled rays hovered, their wings swaying, and yellowfin tuna hunted in the cliffs. Then, overhead, loomed the large, perfect silhouette of a hammerhead.

The hammerhead approached the cleaning station and slowed to a sway as the barber fish nibbled off the parasites. She turned her head to look at me from an eye that juts out at 90 degrees. This gives hammerheads 360-degree eyesight - helpful for catching quick squid in the depths. White, thunderbolt-shaped scars from mating etched the skin near her gills. She was glorious. And then she was gone.

Over dinner of steamed vegetables and snapper - I hesitated before taking the fish - our two dive groups compared what they had seen that day. Stephanie from Paris announced that they had seen a whale shark. In fact, she swam right alongside it. These plankton eaters are the biggest fish in the sea. They are polka-dotted, mostly unafraid of people, and, Stephanie swore, she must have been 40 feet long. Our team boasted of the hammerheads we had seen. A little competition was developing between our groups.

Five-shark view

The next morning, the dive boat took us to a seamount called Punta Maria. We made our way down, down, down to 90 feet. Two hammerheads started circling, then four, then six. Pericas, the dive guide, started clanging a steel stick and pointing up. There she was, our great white whale shark, with a pale belly and blotchy spots. She was accompanied by five large jacks, all cleaning her as she swam.

Hammerheads swam in and out of sight, a round silky shark appeared, and Galapagos sharks arrived. Pericas balled up his hands and pumped a victory gesture. And then behind us, a blacktip shark swam by and the whale shark made its way back around. Five species of sharks in one view: It was nothing short of a miracle.

According to the World Conservation Union, a third of all open-ocean shark species are threatened with extinction. Hammerheads are on their endangered list, and silky, Galapagos, blacktip and whale sharks are near-threatened. In the journal Marine Policy, researchers recently estimated that 63 million to 273 million sharks are killed each year in commercial fisheries.

In 2011, Costa Rica outlawed shark finning, the practice of slicing off the animals' fins and throwing the fish back in the water to die. But the trade still flourishes, and in 2011 alone, an estimated 400,000 sharks were killed in Costa Rican waters and 30 tons of fins were exported to Asia to be made into shark fin soup.

In March of 2013, the Convention on International Trade in Endangered Species ruled that fishers of three species of hammerheads, including the scalloped hammerhead, will now have to have strictly controlled permits to export the fins. Environmentalists considered this a victory, but given the number of sharks pulled from the water every year, it's a small one.

Since hammerheads are rare and their fins dense in cartilage, they are especially valuable. Around Cocos Island, they fall prey to longliners, fishers who spread 5 miles or so of line in the water, hung with baited hooks about every 5 feet. Costa Rica does not require fishing boats to mark their gear, so when rangers find longlines inside the sanctuary, even near a fishing boat, there is nothing they can legally do to the poachers.

In 2012 alone, Golfin told us, rangers confiscated 180 miles of longline and 5,000 hooks. The rangers want to take the fishermen to court, but as Golfin explained, "Longliners serve on Costa Rica's fisheries management board. They aren't going to punish themselves." The rangers' only hope is to get to the hooks before a scalloped hammerhead does. Hammerheads are sensitive animals, and the rangers told us that they always die on a hook because they are so high-strung.

Alcyone days

On our last day, my group's first dive was at a cleaning station called Dirty Rock, while the other group went to Alcyone, a flat-topped reef named for Jacques Cousteau's ship. We saw a few hammerheads and a school of silver jacks, but the other group had us beat.

"Clouds of hammerheads," Ian from England announced over a breakfast of papaya and scrambled eggs. "A shoal."

We were headed for Alcyone next, but just because they had a great dive there didn't mean we would.

Alcyone is known for surface riptides, cold thermoclines, fast currents and frequent surges. These conditions make it one of the best places in the world to spot aquatic wildlife. On the boat ride to Alcyone, we passed a humpback and her baby surrounded by a school of dolphins. Once at the dive site, we dropped into the waves and pulled ourselves down a rope to 80 feet. The show started almost immediately.

Hammerheads! Three and then four circled us. Pericas clanged his metal stick and pointed to a whale shark overhead. As it disappeared, more hammerheads arrived from the depth, spotted our bubbles and swam away. I looked up to see a school of hammerheads, their bodies swaying in the current, layers and layers of them, like an echo through the water. They moved along and so did we. Just in front of me, the whale shark reappeared. I fluttered in the current and got a great view of her huge polka-dotted back.

Pericas clanged again, and the hammerheads were above us. We could see a whale shark and a school of hammerheads, together, like a grand finale. I could have floated there forever, but Pericas started waving us up to 30 feet so our blood could release nitrogen before we ran out of oxygen. Now the hammerheads schooled below us.

Then I looked around.

They were behind me, and beside me, and a few even above me. I was in a cloud of hammerheads. It felt like a state of grace.

Eventually they moved on and we surfaced. On the bumpy boat ride back to the Argo, I put on my sunglasses and cried. Overwhelmed.