Hundreds of splish-splashers enjoying the beautiful weather went scrambling for shore when the toothy fish showed up. Swimming was banned for hours along a 14-block stretch of beach as the shark swam nearby.

“I didn’t want to get eaten,” one frightened teen cried.

Rockaway Beach looked like Amity Island yesterday as hundreds of screaming swimmers scrambled out of the surf after a 6-foot shark – and its ominous dorsal fin – was spotted close to the shore.

“It was scary,” said Julio Lento, 15, of Brooklyn.

“I didn’t want to get eaten.”

Experts believe it was a relatively harmless thresher shark – but during the mad dash for land, the killer great white “Jaws” was on everyone’s mind.

Sunbathers shouted, “Shark!” and “Get out of the water!” while lifeguards frantically blew their whistles to warn people.

Those who dared look behind could see a fin circling about 20 feet from the shoreline.

The beach was shut down immediately from Beach 107th Street to Beach 121st Street, said a Parks Department spokesman.

It reopened some five hours later.

Emergency responders from the FDNY and NYPD rushed to the scene, and a helicopter hovered over the water searching for the menacing-looking creature.

The shark was first spotted around 10:30 a.m. near Beach 109th Street by a couple of eagle-eyed beachgoers about 15 feet off the shore.

“They were saying, ‘What’s that?’ And I looked up and I said, ‘What is that?’ ” said the lifeguard on duty, who only gave his first name, Justin.

At the time, few people were in the water.

They watched incredulously as the tail flapped in and out of the ocean.