A surfer fought off a large shark and then reportedly rode a wave to safety in Western Australia.

Michael Bedford was knocked off his board by the shark, believed to have been a great white, which then came back for a second charge, witnesses said.

But he punched the animal and then caught a passing wave to the shore, where friends used the board's rope as a tourniquet for bite wounds on his leg.

"He gave it a good whack he reckons, a good punch and that doesn't surprise me knowing Mick," witness Lee Cummuskey told ABC.

"It is your worst nightmare and Mick's been through it and survived so he's just really lucky."

Mr Bedford had surgery after Sunday's attack near Albany, south of Perth, and his condition was described as stable.

Australia has several shark attacks each year, with 194 people killed over the past 200 years, records show.

AFP