A SURFER mauled by a shark off south-western Australia managed to swim to shore despite serious injuries to both of his legs.

Alejandro Travaglini, 37, was surfing at Gracetown yesterday when he was attacked, St John Ambulance spokesman Dennis Bertoldo said.

The Argentinian was treated on the beach by paramedics before he was flown by helicopter 160 miles to a hospital in Perth, where his condition is described as stable.

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

Organisers said they had deployed additional shark-spotting drones and jet skis to ensure competitors’ safety.

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 said.