A whale has died in southern Thailand after swallowing more than 80 plastic bags, officials said, ending an attempted rescue which saw volunteers and government vets attempt to nurse the mammal back to health.

Thailand is one of the world's largest consumers of plastic bags, which kill hundreds of marine creatures living near the country's popular beaches each year.

The small male pilot whale became the latest victim after it was found barely alive in a canal near the border with Malaysia, the Department of Marine and Coastal Resources said on their Facebook page Saturday.

A veterinary team tried "to help stabilise its illness but finally the whale died" on Friday afternoon, the post said.

An autopsy revealed 80 plastic bags weighing up to eight kilograms (18 pounds) in the creature's stomach, the department added.