It's unclear how exactly the elephant wound up so far from shore, but the navy suspects a strong current carried it there from somewhere near the coastal town of Kokkilai. It might have been swept up while trying to reach a patch of forest by crossing the Kokkilai Lagoon, an estuary that connects to the Bay of Bengal.

"They usually wade through shallow waters or even swim across to take a shortcut," navy spokesman Chaminda Walakuluge tells the AFP.

The situation was discovered by a naval speedboat on routine patrol, prompting the navy to send out another patrol boat and a team of divers. As the scope of the task became clear, two more vessels from the Rapid Action Boat Squadron joined in, along with a team from Sri Lanka's Department of Wildlife Conservation.

The divers were advised by wildlife officials on the scene, whose guidance "became extremely vital in the rescue mission," the navy reports. Although the distressed elephant was still swimming and snorkeling with its trunk when rescuers arrived (see the video below), they doubted it could reach land on its own. It seemed hesitant at first, but the divers eventually corralled it with rope and towed it back to shore.

By the time they got there, the rescue had taken 12 exhausting hours, but the elephant was OK. The navy helped guide it to the Yan Oya area in Pulmoddai, where it was handed over to wildlife officials. According to Sri Lanka's Hiru News, wildlife officials then released the elephant into the nearby jungle.

The elephant in the flume

They may look awkward in water, but elephants are actually excellent swimmers. They're known to readily cross rivers, or even shallow stretches of ocean when they feel it's worth the trouble. They often use their trunk as a natural snorkel, and the ancestors of this elephant may have even colonized Sri Lanka by swimming over from the mainland. Still, the ocean is known for throwing curveballs, and as one conservationist tells the Guardian, this elephant was likely running on empty.

"They can't keep swimming for long because they burn a lot of energy," says Avinash Krishnan of the conservation group A Rocha. "And the salt water isn't good for their skin, so in this case, the situation probably warranted human intervention."

Asian elephants are listed as an endangered species by the International Union for Conservation of Nature (IUCN), mainly due to habitat loss, fragmentation and degradation. The species was once widespread in Sri Lanka, according to the IUCN, but is now limited to the island's dry zone, and "continues to lose range to development activities throughout the island."

This particular elephant was lucky to be spotted by a patrol boat, and to receive so much help from people who could have just done nothing.