Mark Hartman was surfing on Rockaway Beach Tuesday morning when he encountered his first shark of the day.

“I saw a fin come up and it darted under the water, then barrel rolled, like it caught something,” the 40-year-old photographer recalled. “I thought that was strange, but I wasn’t too worried.”

The second sighting came a few hours later. This time, Hartman said, a roughly 3-foot shark charged out of the murky wake, landing briefly on another surfer’s board. It was enough to make Hartman leave the water, at least for a while.

Along New York City’s 520 miles of coastline, shark sightings are becoming more frequent, due in part to conservation efforts that have fueled a resurgence in bait fish, as well as warming water caused by the climate crisis. Scientists have welcomed the rebound; swimmers and surfers, less so.

On Tuesday, as temperatures climbed into the 90s, the city Parks Department took the unusual step of closing off the entirety of Rockaway Beach to swimming, following a pair of near-shore sightings along the peninsula. The beaches were open Wednesday, though some residents voiced fears of wading back into the surf.

A video shared by the Rockaway Times showed one of the predators leaping through the air just a few yards from shore.

Frank Quevedo, the executive director of the South Fork Natural History Museum on Long Island, said the creature was likely a spinner shark, a non-aggressive species known for its high-flying feeding strategy. It’s one of a handful of tropical sharks that have appeared off New York’s coast in recent years as a result of rising water temperatures associated with climate change.

More positive changes to New York’s ecosystem have also lured sharks back. Among them is recent state legislation that prohibits the use of a netting technique to capture Atlantic menhaden – a favorite meal for a variety of marine life, including whales and sharks. Bans on fishing for certain types of sharks have helped as well.

Those interventions, along with an ongoing cleanup of New York’s waterways, mean there may be more sharks in the region than any time in the last century, according to Quevedo. As more and more New Yorkers flock to the local beaches, sightings are inevitable. So is the occasional attack.

In recent weeks, at least six people have been bitten off Long Island – five off Fire Island, and one off Jones Beach. None were seriously injured. While those incidents might frighten swimmers, Quevedo says they’re largely the case of mistaken identity. Once a shark realizes it's come across a human – and not, say, a scrumptious seal – it’ll typically back off.

“If these people were targets for shark attacks, we’d see people losing limbs and losing their life,” he said. “They’re walking out of the water and getting bandaged with a Band-Aid.”

Dr. Craig O’Connell, president of the Montauk-based O'Seas Conservation Foundation, Inc., agrees, but notes that beachgoers should still take precautions, such as avoiding swimming near people fishing or when schools of baitfish are visible in the water. He also recommends staying out of the water at dusk or dawn and not going in alone.

“Seeing sharks along our shorelines may be much more common in the coming years,” O’Connell said. “Does that mean we cannot use our waters? Absolutely not, but we should follow a few rules to minimize risk.”

As heat-stricken beachgoers learned this week, those precautions may also include closing miles of water access to swimmers. Two days before the full beach closure on Rockaway, a separate shark sighting prompted authorities to shut down roughly 20 blocks of Rockaway – the first-such closure of the season.

A spokesperson for the Parks Department said the decision to close beaches after a confirmed sighting was based on the size of the shark and its proximity to shore. “If appropriate, the lifeguards will whistle people in shallower, or in extreme cases, whistle people out of the water,” the spokesperson, Dan Kastanis, wrote in an email.

In the case of the recent bites off Long Island, experts believe juvenile sand tiger sharks are likely responsible. A nursery of sand tiger sharks — along with great white sharks — is located off the coast of Long Island. On Wednesday, a juvenile white shark washed up on a Hamptons beach.

One Rockway lifeguard, who asked for anonymity because he wasn’t authorized to speak to the press, said shark sightings in the Atlantic Ocean were commonplace – and little cause for concern. He described the decision to shut the beaches entirely as a “paranoid overreaction.”

Hartman, the surfer, said he was similarly undeterred, despite two consecutive shark sightings.

“It’s just kind of what it is,” he said. “I think they’re probably there more often than we acknowledge them.”

On Wednesday, he was headed back into the surf.

This story was updated to include a sixth attack on Wednesday evening.