The navy attached ropes to the elephant and towed it gently to shore. Photo: AFP/Sri Lanken NavySource:AFP

The navy attached ropes to the elephant and towed it gently to shore. Photo: AFP/Sri Lanken NavySource:AFP

IN no small feat an elephant has been rescued from the ocean after being found swimming 16km off the coast of Sri Lanka.

The creature was spotted by a navy patrol boat, floating with its head submerged and seeming to struggle to lift its trunk above the water to get air.

In a miraculous rescue the Sri Lanken Navy were able safe an elephant that had been washed 16km out to sea.

A team of divers and second navy vessel were dispatched to the location, rescuing the stranded elephant by tying ropes around its body and guiding it back to the shore with the using boats.

Department of Wildlife officials were also sent to help, joining forces with the Sri Lankan Navy by "providing necessary instruction which became extremely vital" to the success of this unusual rescue mission, according to the Navy's official statement.

Elephant rescued at sea: Sri Lankan navy tows elephant after it was washed out to sea. Credit - Sri Lankan Navy via Storyful.

It took the crew a gruelling 12 hours to safely direct the animal back to dry land, where it was then given into the care to the wildlife officials for assessment.

According to navy officials, the elephant was likely dragged out to sea after being caught in a current of the coast near the town of Kokkilai.

A researcher from the conservation group A Rocha, Avinash Krishnan, told The Guardian that elephants are actually quite capable swimmers and it is not uncommon for them to swim to get to different landmasses.

"They're very good swimmers. Swimming about 15km from the shore is not unusual for an elephant," he said.

While they can swim when necessary, Krishnan says they tire very quickly because swimming burns up a lot of their energy, so it was lucky that this elephant was found because it may have been out to sea for a considerable amount of time.