WATCH: Surf pro fights off South Africa shark attack in terrifying TV footage
AFP/WSL/AFP - This handout screengrab made and released on July 19, 2015 by the World Surf League shows Australian surfer Mick Fanning being attacked by a shark during the Final of the JBay Surf Open in Jeffreys Bay

An Australian surfing champion fought back against a shark attack during a televised competition in South Africa on Sunday, escaping from the terrifying scene without injury.

Mick Fanning, 34, was competing in the final heat of a world tour event at Jeffreys Bay in the country's Eastern Cape province when a looming black fin appeared behind him.

In a churn of water and spray, Fanning could be seen battling to fend off the shark.

"It came up and got stuck in my leg rope," he said in a television interview afterwards.

"I was kicking and screaming. I just saw a fin. I didn't see teeth. I was waiting for the teeth to come at me as I was swimming. I punched it in the back."

Fanning, a triple world champion nicknamed "White Lightning", was sitting on his board in the water when the shark lunged at him, tipping him off the board.

He was pulled from the water by a nearby rescue jet-ski that rushed to his aid, and said he had only lost his board leash.

The World Surf League (WSL), which organised the J-Bay Open, said two sharks were spotted in the water near Fanning and his rival Julian Wilson, also from Australia.

"We were all watching and then all of a sudden you could see the fin so we knew it was a shark," spectator Kaylee Smit told the News24 website.

"We could see the splashing and he was knocked off his board.

"I thought this guy was going to die in front of us.

"The whole crowd rose to their feet in complete silence and then that was broken by the announcer screaming over the information system for people to get out of the water. I am still in shock and I am shaking," Smit said.

- 'Heroic' -

The WSL issued a statement saying that the competition was cancelled after discussions with both surfers, who agreed to share the winner's prize money.

"Mick's composure and quick acting in the face of a terrifying situation was nothing short of heroic and the rapid response of our Water Safety personnel was commendable," it said.

Craig Lambinon, spokesman for the National Sea Rescue Institute, told ENCA television news: "We believe it is probably the first time that an incident like this at a surfing competition has been caught on camera.

"The NSRI is urging bathers and surfers to be cautious in the area.

"It is a person's own prudence that they exercise in entering the water. We know that there are sharks in the sea, and we are really going into their environment."

Slow-motion television footage showed the shark silently approaching Fanning from behind at high speed, first apparently trying to bite his legs before knocking him off the board with a blow to the shoulder.

Patrol boats and jet-skis charged in as a shark alarm siren was sounded and Fanning desperately swam away waving for help.

Calvin Bradley, of surf magazine ZigZag, was watching from the beach when the attack took place.

"(Fanning) was waiting for his wave to come through and while he was staring out to the horizon, suddenly a fin suddenly appeared behind him," he said.

"Everyone's heart just dropped because we knew exactly what was happening... He disappeared behind the waves and we were expecting the worst.

"It looked like he managed to get off the shark with his kicking and punching.

"He escaped unscathed, his leash was bitten by the shark and the rescue crew... rushed to where he was and brought him on board. He was very shaken."

Watch video of the shark encounter, embedded below:

Watch Fanning's emotional interview after the shark encounter: