A man who was bitten by a shark in Cape Cod has died, becoming Massachusetts' first shark attack fatality in over 80 years.

The 26-year-old and his friend were boogie-boarding off Newcomb Hollow Beach in Wellfleet when the attack took place around noon on Saturday, Wellfleet Police Lieutenant Michael Hurley said.

Witnesses on the shore watched, horrified, as the injured man was dragged out of the water by his friend.

Joe Booth, a local fisherman and surfer, said that he saw the victim kick something behind him and the flicker of a tail in the water.

"I was that guy on the beach screaming, 'Shark, shark!" said Mr Booth.

"It was like right out of that movie Jaws. This has turned into Amity Island real quick out here."

People on the beach frantically rushed to make a tourniquet while others called the emergency services.

"We've been surfing all morning right here and they were just further down," said Hayley Williamson, a Cape Cod local.

"Right spot, wrong time, I guess."

The man was taken to Cape Cod Hospital where he later died, State Police spokesman David Procopio said.

The beach where the friends were based has now been closed.

The 26-year-old was from Revere, in Massachusetts. His family has been notified but his name has not yet been released.

Last month, a 61-year-old man from New York was severely injured on 15 August after fighting off a shark in Truro, just four miles away from Saturday's attack.

He is currently recovering in hospital in Boston.

There have been frequent shark sightings along Cape Cod this summer.

The US National Park Service said it closed beaches for at least an hour about 25 times this year, which is more than double the annual average.

A Cape Cod politician blamed the attack on officials who didn't take aggressive action against white sharks.

"It is my personal belief that the responsibility for this horrible shark attack rests squarely upon the shoulders of the aforementioned officials for their utter lack of attention and inaction regarding the growing shark problem on Cape Cod of the last few years," said Barnstable County Commissioner Ron Beaty.

The last shark attack fatality in the state was on 25 July 1936, when 16-year-old Joseph Troy Jr. was bitten in waters off Mattapoisett.