Sri Lanka's navy has said more than 100 whales have been rescued after becoming stranded on a beach on the island's southwest coast.

Villagers defied a novel coronavirus curfew to join the navy, wading into the breaking surf to push the small whales back into the sea at Panadura, south of the capital, Colombo.

"We pushed back all of them last night, about 100 to 120 whales," navy spokesman Captain Indika de Silva told Reuters.

Four of the whales died during the rescue operation, he added.

A Sri Lankan Navy soldier tries to push back a stranded pilot whale into the deep water

"I was fishing when I saw a dark patch and about 100 came ashore," said a fisherman. "We've pushed as many as we can back to sea."

"I don't know why this has happened. It's never happened before. This is the first time I've seen it," he said.

The phenomenon of whales getting stranded in shallow water remains largely a mystery to scientists.

In September, several hundred whales died in shallows off the coast of Australia in its biggest stranding on record and one of the largest in the world.

Whale beaching: An enduring mystery