Two people were bitten by sharks just hours apart while surfing along the same stretch of western Australian coastline today, local media reported.

A 37-year-old man was surfing at Cobblestones Beach at Gracetown, about 270km south of Perth, when he was bitten on both legs at about 1am Irish time by a shark.

Close-by surfers used leg ropes to stem the bleeding before he was flown to Royal Perth Hospital where he remains in a stable condition.

A second man was bitten about 2km away at Lefthanders Beach around 7.30am Irish time, receiving a gash on the leg. He was treated by paramedics on the beach.

The World Surf League (WSL) Competition at nearby Margaret River was temporarily suspended, before resuming with added mitigation measures, which included extra jet-skis and drones.