Beachgoers on Cape Cod in Massachusetts endured a close call with a great white shark on Saturday, as the meat-eating machine was spotted shadowing a kayaker about 100 to 150 yards from shore. The shark prompted officials to close the beach for the rest of the day, reopening it on Sunday.

Lifeguards and swimmers spotted the shark, measuring between 11 and 14 feet long, trailing a kayaker just off Nauset Beach.(Check out the photo below.) It led to a Jaws-like exodus of about 3,000 swimmers, with no one harmed.

Everyone was very relaxed and the shark put on quite a show moving back and forth out in front of the beach, but it was done in a very orderly fashion, Harbormaster Dawson Farber told ABC News.

It is not the first time sharks were seen off Cape Cod's shores. Authorities have identified at least 20 great white sharks just off the cape in the last three years, according to CNN.

Farber suggested swimmers had little to fear if they remained aware and stayed away from seals.

In fact, it is a dense population of gray seals that has lured the sharks so close to the shore. The population of seals off Cape Cod has grown from 10,000 to more than 300,000 due to marine life preservation efforts.

The elbow of the cape has these large, dense concentrations of gray seals now, and these white sharks go to the area to feed, Greg Skomal, a senior biologist at the Massachusetts Division of Marine Fisheries, told ABC. Because the seals are so abundant, now the white sharks are paying more attention.

But the seals and local beachgoers rarely mix: There is a significant distance between the swimming area and the nearest wildlife refuge.

Sharks are not there to feed on people; they're there to feed on seals, Skomal said.

Nonetheless, the great white sighting on Saturday was made not far from where Steven Spielberg's classic thriller Jaws was filmed.

A man finally notices a great white shark trailing him in his kayak at Nauset Beach on Cape Cod in Massachsetts.