Two surfers were bitten by sharks off Western Australia’s southwest coast Monday, forcing a brief suspension of the Margaret River Pro event — part of the World Surf Tour. Authorities have warned beachgoers and surfers about the sharks.

A 37-year-old man was bitten on the lower leg at Cobblestones beach in Gracetown, but managed to escape the deadly encounter by swimming back to shore. The victim was flown to Royal Perth hospital where he remains in a stable condition and will undergo surgery, media reports said. A 13-foot-long shark was later spotted nearby.

Surf photographer Peter Jovic, who witnessed the attack, told ABC news that "a shark pretty much popped up and ended up knocking a surfer off his board."

"There was a lot more thrashing around after that, it was pretty hard to see what was going on. The surfer who was being attacked ended up miraculously body surfing into a little wave and getting pushed in by a local at the same time, who was out there with him, and making it to shore before everyone came to his aid," he said, adding that everyone was ”walking around like stunned mullets” after the attack.

In the second attack, 41-year-old Jason Longrass was bitten by a shark off Lefthanders beach. The victim told reporters in Gracetown that he had not heard about the first shark attack and was unaware about the beach closure. The second attack took place roughly six hours after the first one.

In a tweet, the World Surf League's (WSL) Margaret River Pro 2018 said that after being informed about the shark attacks in the vicinity they decided to put the tournament on hold.

"We have been alerted of a shark incident that occurred near Gracetown," the WSL said in the tweet. "The safety of our surfers and staff is a top priority."

North Point, Big Rock and Lefthanders beaches were closed following the attacks. The Department of Fisheries sent officers to investigate the incidents.

shark warning
Swimmers walk into the surf next to a sign declaring a shark sighting on Sydney's Manly Beach, Australia, Nov. 24, 2015. Reuters/David Gray

Below are some tips on how to avoid and survive a shark attack, according to the Florida Museum of Natural History website.

1. Choose to swim in a group as sharks most often attack lone individuals. In case of fishing, try not to go away from the shore. Wandering too far from the shore could make it difficult to return fast for help in case a shark is spotted.

2. Avoid the water at night, dawn, or dusk as sharks are most active during these times.

3. In case of a cut, do not enter the water as blood attracts sharks.

4. Leave the water immediately if a shark is spotted.

5. Avoid going into waters containing sewage as it attracts bait fish, which in turn attract sharks.

6. Don't splash a lot in the water. Erratic movements can attract sharks.

7. Avoid swimming toward a shark if it's seen in the water. Close encounters with sharks could turn fatal.

8. Do whatever it takes to get away after a shark attack.