great white shark
A great white shark swims past a diving cage off Gansbaai about east of Cape Town, South Africa, Jan. 17, 2000. Reuters

A video of a great white shark thrashing in shallow waters surfaced and went viral over the weekend. The video, captured by California resident Dale Pearson, shows his surprise when he finds himself coming too close to the 14-feet-long animal near his house in the town of Puertecitos in Baja California, Mexico.

Pearson and one of his friends went close to the shoreline after seeing what they thought to be a beached whale or hammerhead shark struggling to get back to deper waters. The animal was seen swimming in water that was only about three feet deep. Pearson reportedly grabbed his camera phone when he saw the animal, but as he went close, he realized it was a great white shark.

"That's a f------ white shark," Pearson says in the video. "Holy s---!"

Read: Shark Attacks, Bites Man Fishing In Florida Keys

“It would come into the shallows and lay there motionless, then it would move out again [swimming to] six feet of water, circle back in [to the shallows], come into another spot and lay there motionless,” Pearson, a dive boat operator who has experience with shark research missions, told Huffington Post.

After filming their encounter, Pearson uploaded the video to his company’s Facebook page, Pearson Brothers Winery, where it went viral. As of Sunday night, more than 800,000 people had seen the video.

Initially, it was unclear why the shark was struggling in the shallow water, but later it was revealed the animal was wounded. The video shows a large open wound just behind the shark's dorsal fin. According to reports, the injury was not believed to be life-threatening and Pearson noted that the shark was not stuck. The viral video was also shared by the Marine Conservation Science Institute in California (MCSI), which said the animal will not die from the wounds as "they [great white sharks] are exceptionally tough with incredible healing ability."

WARNING: Graphic and offensive language in the video below.

Pearson first believed the creature was caught in a gill net before noticing two huge propeller wounds on its back. He later said the shark may have come into the shallow waters searching for food.

“White sharks are generalists (and scavengers) when it comes to diet,” Mark Domeier, marine biologist and president of MCSI, wrote on Facebook. “In other words they will eat whatever they want at that moment!”

California has witnessed several shark sightings and shark attacks in recent years. A graph from sharkattackdata.com, a database of incidents, showed shark attacks had been steadily rising in California since around 2004. Most occurred in San Diego and Humboldt counties.

Read: Kentucky Teen Bitten In Florida Escapes By Punching Shark

California isn’t the only place that has seen a rise in sightings. A study of great white sharks in Cape Cod, Massachusetts, in March revealed that the number of sharks had increased in recent years. Conducted by the Massachusetts Division of Marine Fisheries, the report showed 80 sharks had been counted in 2014, while 147 were located in 2016.

Over the weekend, an eight-foot shark attacked a man spearfishing off the coast of Key West, Florida. Parker Simpson, 23, was hospitalized after a suspected reef shark attacked him when he was about 50 feet underwater. A 35-year-old swimmer was also attacked in shallow water on a beach near San Diego in May, leading to beach closures and concerned residents.