The shark appeared to be struggling.
An attempt to save a 15ft (4.4m) shark off a North Yorkshire beach has failed despite a massive effort from lifeboat crews and rescue specialists.
The basking shark was stranded alive on Filey beach on Thursday evening.
Rescuers from British Divers Marine Life Rescue (BDMLR) said a large crowd of people had gathered to try to assist the creature when its medics arrived following a call at about 6pm suggesting a shark was in difficulty.
The BDMLR said: "With the help of the local Coastguard and RNLI teams, together they managed to guide the 4.4-metre long creature back into the water as the tide came in.
"Unfortunately, the shark appeared to be struggling as it was listing consistently over to its right-hand side and circling in the shallows, sometimes needing support from the rescuers.
"Potentially this could indicate it was weak, unwell or may even have suffered some brain damage during the process of live stranding."
The BDMLR said: "Despite attempts to move it into deeper water the shark continued to head back to the beach where it restranded and later in the evening was put to sleep by a vet due to the poor prognosis."
It said: "Thank you to all Medics, Filey Lifeboat Station, Filey Coastguard, Scarborough SEA LIFE Sanctuary and RSPCA (England & Wales) who attended plus our Hotline Coordinator Teri who did what they could for the animal under these unusual and difficult circumstances."
Footage filmed by people in the crowds on the beach and nearby cliffs showed a number of rescuers in the water dwarfed by the sharks huge dorsal fin.
The charity said the shark is thought to have been a male and was around the size and age where it would have been maturing into an adult.
It is possible a lack of oxygen passing through its gills in the shallow water could have explained its behaviour, it said.
Basking sharks are most often seen on the west coast of the UK and sightings in the North Sea are rare, the BDMLR said.
They are mostly seen in British waters from spring until autumn, with occasional sightings in winter.
Basking sharks, which are listed as endangered by the International Union for the Conservation of Nature, are the second largest fish, after the whale shark, and can grow to 10m-plus.
But they are not a danger to people as they feed only on plankton - swimming along with their huge mouth open and using specialised "rakers" in the gills to extract their food as it passes through them. Basking sharks are thought to live for more than 50 years.
Dave Higgens is a reporter for PA.