Ruining the reputation of sharks as bloodthirsty predators, California researchers said they have found a shark that enjoys a side of seagrass with its prey.

Bonnethead sharks not only eat grass while chomping fish and squid — they also digest the plant and gain nutrition from it, scientists at the University of California, Irvine announced Wednesday. The study was published in Proceedings of the Royal Society B.

It turns out bonnetheads have high levels of enzymes that break down fibre and carbohydrates, compared with the low amount carnivores typically have. That makes the bonnethead the first known omnivorous shark, researchers said.

Laboratory video posted online shows a small bonnethead devouring a meal of 90 per cent seagrass and 10 per cent squid.

It was previously believed that bonnetheads unintentionally consumed the grass in shallow areas where the species lives along some coastlines in the U.S., Central and South America.

The smallest of the ten hammerhead species, bonnetheads are typically about 0.6 to 0.9 metres (2 to 3 feet) long.

Samantha Leigh, who headed the four-year study at UCI's School of Biological Sciences, said she hopes the discovery will help protect seagrass ecosystems that are at risk from climate change.

"The fact a highly abundant kind of shark feeds on the grasses is yet another indication of why we need to preserve this vegetation," she said.

In this Sept. 2016, photo provided by the University of California Irvine, UC Irvine grad student, Samantha Leigh handles a bonnethead shark in Irvine, Calif. Leigh, who headed the four-year study at UCI's School of Biological Sciences, said she hopes the discovery will help protect seagrass ecosystems that are at risk from climate change. (Yannis P. Papstamatiou/University of California Irvine via Associated Press)

Sandy Trautwein of the Aquarium of the Pacific in Long Beach called the findings "unique, but not surprising, given bonnetheads' niche in tropical ecosystems."

She said she hopes the study "opens up the door for additional research" about seagrass communities and sharks in general.