A man was bitten by a shark while boogie boarding off a Cape Cod beach on Saturday and died at a hospital, becoming Massachusetts’ first shark-attack fatality in more than 80 years.

The 26-year-old man from Revere, Mass., succumbed to his injuries after the attack off Newcomb Hollow Beach in Wellfleet at around noon, Wellfleet Police Lt. Michael Hurley said.

Joe Booth, a local fisherman and surfer, said he saw the man and a friend boogie boarding when the attack happened.

He said he saw the man aggressively kick behind him and a flicker of a tail from the water. He realized what had happened when the friend came ashore dragging his injured friend.

“I was that guy on the beach screaming, ‘Shark, shark!’ ” Booth said. “It was like right out of that movie ‘Jaws.’ This has turned into Amity Island real quick out here.”

Booth said some on the beach attempted to make a tourniquet as others frantically called 911.

Hayley Williamson, a Cape Cod resident and former lifeguard who was on the beach, was in disbelief after the man was rushed into an ambulance.

“We’ve been surfing all morning right here, and they were just further down,” she said.

The man, whose name was not released, was pronounced dead at Cape Cod Hospital in Hyannis, according to state police.

The beach was closed to swimming Saturday.

“Today is just keeping everyone out of water,” Hurley said. “There’ll be a determination later about what the town wants to do with the beaches going forward.”

It was the state’s first fatal shark attack since 1936 and the second shark attack this season.

A 61-year-old New York man was severely injured Aug. 15 after fighting off a shark off Truro, 4 miles north of Saturday’s attack.

The last fatal shark attack in the US was on April 29, 2015, off Maui, when snorkeler Margaret Cruse, 65, was found dead from a bite to her upper chest

With sunny, warm weather Saturday, the Wellfleet beach was busy, even though the summer season was over and lifeguards were no longer on watch.

There have been frequent shark sightings this summer on the outer Cape, leading to beach closings. The National Park Service said it closed beaches for at least an hour about 25 times this year — more than double the annual average.

The state’s last shark attack fatality came on July 25, 1936, when Joseph Troy Jr., 16, of Boston, was bitten off Mattapoisett.

With AP