Updated

An official says a shark mauled a surfer off the southwest Australian coast, inflicting serious injuries to both legs.

St. John Ambulance spokesman Dennis Bertoldo said the man, aged in his 30s, was surfing at Gracetown on Monday when he was attacked.

Bertoldo says the man was treated on the beach by paramedics before he was flown by helicopter 250 kilometers (160 miles) to a hospital in the city of Perth.

The hospital describes the victim's condition as stable.

The attack prompted the World Surf League to temporarily postpone the nearby Margaret River Pro surfing contest.

Lifeguards say a 4-meter (13-foot) shark was spotted off a nearby beach two hours after the attack.

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