In a summer of shark sightings, a 61-year-old man became the state’s first shark attack victim this year off Long Nook Beach in Truro — sustaining puncture wounds to his leg and torso when a predator struck 30 yards from shore.

The man had to be flown by medical helicopter to a Boston hospital due to the seriousness of his injuries.

Eyewitnesses said the man was 30 yards off the shore in deep water when the shark struck.

“He was yelling ‘Get me out of the water. Get me out of the water. Shark! Shark!’ ” said eyewitness Thomas Buckett of Smithfield, R.I. “I looked at him and got nervous. I went in above my knees to get him.”

Other beachgoers helped carry the injured man up the beach.

“I hope he makes it,” Buckett added.

Long Nook Beach is on the Atlantic Ocean side of Cape Cod. A great white shark was spotted in the area by TV helicopters responding to the scene.

Assistant Truro Harbormaster Gary Sharpless said authorities rushed to the beach around 4 p.m. for a man with puncture wounds to the leg and torso.

Fire Chief Timothy Collins said the victim was sent to a Boston hospital because the injuries were considered serious and “warranted transport to a Level One trauma center.”

Truro officials ordered the beach closed to swimming, according to the town’s website.

Sharpless said seals around Truro bring the sharks closer to shore.

“I think what happens is that we have a lot of a seal population and basically when people boogie board or are treading around in the water they probably look like an injured seal,” Sharpless said. “What I have heard is when these incidents occur, typically what happens is that sharks, they might take a nibble and find out it’s not a seal and leave it alone. Hopefully this is something that is not life-threatening.”

Noted shark researcher Jelle Atema, a retired Boston University professor and Woods Hole Oceanographic Institution researcher, said the hot summer and rise in water temperature could also be playing a part.

“It’s clear, the increase in seawater temperature will create behavioral changes,” he told the Herald last night. “As the food moves, the sharks will follow.”

He said the ecosystem — especially sharks and the seals they hunt — must be taken into consideration.

“It’s hard to pinpoint,” Atema added, “because their behavior is mostly due to their prey.”

Truro was the scene of the state’s last shark attack in July 2012, when a Colorado man suffered a bite off Ballston Beach.

Matt Rivers, surfer and owner of the Pump House Surf Shop in Orleans, said he surfs on Long Nook Beach every day and is not worried about the recent attack.

“I’m sorry to hear the news,” Rivers told the Herald. “It is the first I’ve heard of it. I haven’t seen any sharks this year.”

Joe Dwinell and David Curran contributed to this report.