A great white shark that got stranded on a Chatham beach is swimming free thanks to beachgoers who kept it wet until rescuers arrived.

Witnesses say the seven-foot, male shark got stuck Monday near South Beach in Chatham as the tide went out.

Beachgoers kept the shark wet by splashing it with buckets of water until officials attached a line to its rear caudal fin and Harbormaster Stuart Smith pulled it back into open waters. Officials say it took about an hour.

Smith says about 40 people were crowded around the shark when he arrived and it appeared dead.

The shark was tagged by state shark scientist Gregory Skomal.