Thirty feet below the surface off the southeast coast of Mallorca, Joan Vidal Ferrer ran his hand over a stretch of seabed that a year ago was a dense green meadow. What remained was a mat of brown, rotting leaves and the fibrous stumps of the seagrass that had grown there, by his institute’s estimate, for 2,000 years.

“This is what a fever does to a forest,” said Dr. Vidal Ferrer, a marine biologist at the Mediterranean Institute for Advanced Studies, surfacing after a monitoring dive last week. “It did not get cut or dredged or poisoned. It simply got too hot for too long.”

The western Mediterranean experienced its most intense marine heat wave on record this summer, with sea surface temperatures around the Balearic Islands holding at or above 29.5 degrees Celsius, about 85 Fahrenheit, for 23 consecutive days in July and August and reaching 30.4 degrees at one buoy. Posidonia oceanica, the slow-growing seagrass that carpets the shallow seabed around the islands, begins to die when water stays above 28 degrees for extended periods, and the institute’s autumn survey of 38 monitored meadows found an average shoot mortality of 41 percent, more than triple the previous worst year.

The losses matter far beyond the dive sites. Posidonia meadows dampen waves and trap sand, and the dead leaves that wash ashore each winter form the natural berms that protect the islands’ beaches from storms. They shelter juvenile fish and are among the most efficient carbon stores on earth, locking away as much carbon per hectare as a tropical forest in dense mats of root and sediment that can be 20 feet thick. The seagrass grows about half an inch a year; a meadow lost in one summer takes centuries to return.

“We have a beach-protection system that the tourism industry has never paid a euro for, and it is dying,” said Marc Oliver, a senior official in the regional environment department. The Balearic government banned anchoring on Posidonia in 2018, deployed 180 ecological moorings and runs a summer patrol that issued 2,100 fines to yachts this year. “We solved the anchor problem,” Mr. Oliver said. “We cannot patrol the temperature.”

Catalina Riera, who has run a dive center at Cala d’Or since 1996, said her customers had begun to notice. “The Germans who come every year ask where the fish went,” she said. “The seagrass is where the fish grow up. No meadow, no bream.” She has started taking divers to document the die-off for the institute, logging photographs at marked points.

The research institute is testing whether meadows can be reseeded with shoots from deeper, cooler water that survived the summer, and whether some genetic lines tolerate heat better than others. Dr. Vidal Ferrer is cautious. “We can replant a hectare at great cost,” he said. “The Balearics have 65,000 hectares. The only treatment that works is a cooler sea.”

He looked back at the water, flat and still warm in October. “Every year I tell myself this was the bad one,” he said. “I have stopped saying that.”