CNN  — 

A 37-year-old man was rescued by a US Coast Guard helicopter after he was bitten by a shark while surfing near Santa Rosa Island in California Saturday.

“This was the best possible outcome to a truly terrifying situation,” said Coast Guard spokesman Lt. Benjamin McIntyre-Coble.

The victim’s friend notified the Coast Guard of the attack and put a tourniquet on the victim’s leg to “prevent further blood loss,” according to the Coast Guard.

“We are so grateful to the good Samaritan who jumped in to save this guy,” Petty Officer Mark Barney told CNN. “It’s not like the New Jersey shore where out there where you might have 100 people the beach. Santa Rosa Island is remote especially out there on the northwest side where he (the victim) was surfing.

“This could have gone in a different direction, but thankfully the good Samaritan was out there. They applied the tourniquet, which is crucial. You have to get a grip on the blood flow, and that good Samaritan had their head in the right place and did everything properly.”

A MH-65 Dolphin rescue helicopter was sent to rescue the man. A video shared by the USCG shows the surfer being hoisted from a boat wearing a wetsuit with a white tourniquet wrapped around his left thigh.

The victim was flown to Santa Barbara Airport and then taken to a hospital.

Santa Rosa Island is located 26 miles off the coast of Santa Barbara and is part of Channel Islands National Park.

The man was transported to Santa Barbara Airport where emergency medical technicians treated him, the Coast Guard said. He was taken to a local hospital, where he was in stable condition, according to the Coast Guard and the Ventura County Fire Department.

“This individual was fortunate to be with a buddy who was able to communicate their position to the Coast Guard,” McIntyre-Coble said. “We are all happy that he will be able to be with his family in time for the holidays.”

According to the International Shark Attack File, white sharks have made up 97% of shark attacks in California. Leopard, mako and blue sharks have also attacked humans in California.

The breed of shark was not identified. According to the ISAF, white sharks have made up 97% of shark attacks in California. Leopard, mako and blue sharks have attacked humans in California as well.

CNN’s Paul Vercammen contributed to this story.