PERTH, Australia -- A surfer mauled by a shark Monday off southwestern Australia managed to swim to shore despite serious injuries to both of his legs, an official and a witness said. Alejandro Travaglini was surfing at Gracetown around 8 a.m. when he was attacked, St. John Ambulance spokesman Dennis Bertoldo said.

The Argentinian-born 37-year-old was treated on the beach by paramedics before he was flown by helicopter 160 miles to a hospital in the city of Perth, Bertoldo said.

The hospital described the victim's condition as stable.

The attack prompted the World Surf League to postpone the nearby Margaret River Pro international surfing contest for about an hour.

Organizers had deployed additional shark-spotting drones and jet skis when the competition resumed to ensure competitors' safety, league deputy commissioner Jessi Miley-Dyer said.

Get Breaking News Delivered to Your Inbox

"We wanted to reconvene and make sure we had everything possible in the water to look after those surfers," Miley-Dyer said in a statement on the league's website.

Surf photographer Peter Jovic watched the attack from the beach and likened it to the live broadcast of a shark attack in South Africa in 2015. Former champion surfer Mick Fanning escaped unscathed when a great white attacked his board as he waited to catch a wave.

"If anyone is familiar with the Mick Fanning moment ... it was very similar to that, where a shark pretty much popped up and ended up knocking a surfer off his board," Jovic told Australian Broadcasting Corp. radio.

"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," Jovic said.

Lifeguards said a 13-foot shark was spotted off a nearby beach two hours after the attack.

Nine Network television news reported a 41-year-old surfer sustained a large gash to his right thigh from a shark later Monday at a beach near where the attack occurred.

"Happy to be alive," the unnamed man told bystanders who asked if he was OK. The man insisted he could drive himself to a hospital.

A surfer was killed by a shark at Gracetown in 2013.