TALK about a sting in the tail. Surfer Bishan Rajapakse was lucky to be pulled from the waves with only a headache and sore shoulder after he was knocked unconscious by a southern right whale yesterday.

The 38-year-old hospital emergency unit doctor was heading back to the beach at Bondi about 10.30am when he saw "a big, black shadow" as the whale surfaced near him.

"Some other surfers were quite close to it and I remember wondering to myself about that tail - I thought 'Wow, this could just go and knock us all out'," he said.

The next thing Dr Rajapakse remembers is lifeguards treating him on the sand.

Lifeguard Anthony "Harries" Carroll said: "The whale has lifted his tail and it's come down and struck the (surfer) on the head and knocked him out."

media_camera Bishan Rajapakse in St Vincents Hospital after he was knocked unconscious by a whale while surfing at South Bondi Beach, Sydney. Picture: Gregg Porteous

Mr Carroll said the force of the impact had punched a "large-sized ding" in Dr Rajapakse's surfboard.

"This could have been a major incident, a fatality, so for this guy to walk away with minimal injuries ... he's probably the luckiest emergency doctor to end up in emergency," he said.

Surfer Tony Spanos said the whale had made a "huge turn" and come out of the water directly underneath a group of surfers, knocking him off his board. He saw Dr Rajapakse get knocked out.

"I had to go under and quickly pull him out from underneath, from going down," he said.

media_camera A whale surfaces near surfers at Bondi Beach. Picture: John Brawley

St Vincent's head of emergency Gordian Fulde said Dr Rajapakse - who works at Wollongong Hospital - was fortunate not to have any broken bones but he remains in hospital for observation to see if he had suffered any underlying damage from the "unbelievable accident".

National Parks and Wildlife whale expert Geoff Ross said southern right whales were known for liking shallower water - and for their unpredictable behaviour.

"Whales are generally not aggressive animals but they will defend themselves - they can see people in the water as a potential predator," he said. "Like all wild animals, you need to respect them and their position in the ocean."

Swimmers and surfers are banned from going closer than 30m from whales in NSW waters.

Girlfriend Sanna Lundmark had been waiting on the beach when she saw people huddled around Dr Rajapakse. "I saw his feet and they didn't move. I was really worried ... then I saw him talking," she said.

Dr Rajapakse said the incident would not put him off surfing. "I think if I saw a whale again I'd probably tell other people just to hold back. I guess I've got the evidence to say things can go wrong."

Originally published as Video of whale before surfer thrown into air