BOSTON (Reuters) - A 13-foot great white shark off the coast of Cape Cod prompted Massachusetts officials on Friday to warn beachgoers to be aware of their surroundings and to use common sense when swimming.

State biologists located the shark, which had been tagged with an acoustic transmitter, near Cape Cod island of Monomoy on May 28. White shark sightings have been on the rise off the Massachusetts coast, the setting for the 1970s shark movie, "Jaws".

The Department of Marine Fisheries advised people to avoid swimming at dawn and dusk, to stay close to the shore and to avoid areas where seals congregate.

Massachusetts has been compiling data on great white sharks since 1987. Experts have said the sharks are attracted to that coast by a growing population of gray seals.

There have been eight recorded shark attacks in Massachusetts, two of which were fatal, according to Shark Attack File, which compiles data on shark attacks worldwide.

In the latest attack, a vacationer from Colorado was bitten in the legs off Cape Cod in July 2012.

White sharks can be found in all of the world's oceans and can grow as long as 20 feet and weigh as much as 5,000 pounds.

(Writing by Richard Valdmanis; Editing by Toni Reinhold)