A man leapt from his surfboard on to a shark that was attacking his wife, repeatedly punching the animal until it let go, Australian media report.
Chantelle Doyle, 35, was surfing off Shelly Beach at Port Macquarie, New South Wales, when the attack took place.
Her husband punched the shark until it released its grip and then helped Ms Doyle to the shore.
She was airlifted to hospital with serious injuries to her right leg.
Experts quoted by the Port Macquarie News believed Ms Doyle had been mauled by a juvenile great white shark up to 3m (10ft) in length.
Surf Life Saving NSW chief executive Steven Pearce praised the husband – named by media as Mark Rapley – for his quick action.
“This fella paddled over and jumped off his board on to the shark and hit it to get it to release her and then assisted her back into the beach,” he said, quoted by the Sydney Morning Herald. “Pretty full on, really heroic.”