An aerial view of the rescued shark after it regained some of its strength.

A young, great white shark had a near-death experience when the retreating tide left it stranded on a beach in Cape Cod on Monday afternoon (July 13). Beachgoers spotted the giant fish writhing on the sand, and threw water on its gills to help it breathe.

State officials arrived soon after, and dragged the shark into the water using a long rope attached to a motorboat, as seen on video of the shark rescue. At first, the shark looked limp and lifeless. But, it came to after the officials held it close to the moving boat, allowing water to flow over its gills.

It was a rare event, and not just because people saved the life of a vilified marine creature, shark experts told Live Science. Great whites rarely wash up on beaches because they typically live in the open water, far away from the coast, said George Burgess, a shark expert at the Florida Museum of Natural History at the University of Florida in Gainesville. Fortunately, beachgoers reacted in time, though shark scientists who viewed the video suspect the great white didn't come out unscathed, as the heat and lack of oxygen likely taxed the animal's body. [Jaws Gallery: See Amazing Photos of Great White Sharks]

Great whites get confused

Although there's no exact count of great whites beaching themselves, "these guys sometimes come ashore very much alive," Burgess said. "They've spent their lives in the open sea, and they get confused a bit" when they encounter the coast's tides, rocky walls and sandy floors.

When great white sharks and other pelagic, or open-ocean, sharks do get "beached," they're usually inexperienced juveniles, Burgess said.

"Perhaps they're a little more naive than their older kinfolk, who have probably encountered [beaches] at some point and figured it all out," he told Live Science.

Sharks that live close to shore, like the requiem shark family, which includes spinner and blacktip sharks, are better-equipped to understand the intricacies of the surf zone and realize that it has a bottom, he added.

Hopefully, the rescued shark learned its lesson to steer clear of beaches, but its future is far from certain, the experts said.

Gregory Skomal, a fisheries biologist with the Massachusetts Division of Marine Fisheries, put an acoustic tag on the rescued great white that will ping receivers in the area as the shark swims around. Biologists check the various receivers about once or twice a week to track animal movement, Skomal said. But the technology isn't always reliable, as batteries can die and trackers can fall off animals, experts said.

"If you hear from it you know it's alive, and if you don't hear from it, you don't know anything," Skomal said.

Beach prison

Video recordings show how the rescue saved the shark's life. But the 7.5-foot-long (2.3 meters) juvenile was likely injured while it waited for help, said Daniel Abel, a professor of marine science at Coastal Carolina University in Conway, South Carolina.

Like any other fish out of water, sharks have trouble breathing on land.

An underwater photo of the juvenile white male rescued from a beach in Cape Cod. (Image credit: Atlantic White Shark Conservancy MA DMF)

"Air has considerably more oxygen than water does, but gills are not designed to function in air and so they collapse on each other," Abel said. "As long as they're moist, they'll get some oxygen in there … enough to probably survive."

Furthermore, a beached shark doesn't have buoyant water to support its weight. This may explain why one of the recordings shows "a little bit of blushing, or reddening, on its underside," Abel said. "That means that some of the blood is pooling and breaking some of the little capillaries on the bottom." [On the Brink: A Gallery of Wild Sharks]

Being on a hot beach can also lead to overheating. Great white sharks and their relatives are warm-bodied animals, meaning they can maintain a body temperature that is warmer than the surrounding water, Abel said. A fast metabolism lets sharks act as top predators. Their muscles contract faster and they can collect sensory information better than animals that aren't warm-blooded, he said.

But once they're out of the cool water, sharks easily overheat, Abel said. He commended the beachgoers for throwing water on the stranded shark, which likely not only helped it breathe but also let it cool down, he said.

It's possible the public will see more great white sharks stranded on beaches in the future. Their populations are gradually increasing along the east and west coasts of the United States, according to two 2014 studies conducted by Burgess and his colleagues.

Perhaps their numbers are increasing because they have more food to eat, including seals and sea lions, which are now protected under the Marine Mammal Protection Act of 1972, he said.

As more great whites munch on seals near the coast, people will inevitably see more strandings, as well as shark sightings, Burgess said. "And unfortunately, at some level, there's going to be some more interactions that are bites," he said.

Awareness and caution can help prevent shark bites, experts said.

"Quite apart from fearing predators, we should celebrate them," Abel said. "An ocean needs its food web, and sharks are essential at several different levels of that."

Follow Laura Geggel on Twitter @LauraGeggel. Follow Live Science @livescience, Facebook & Google+. Original article on Live Science.