SYDNEY (AP) — A woman has survived a great white shark attack on Australia’s east coast after her surfing companion repeatedly punched it until it let her go.

Paramedics were called to Shelly Beach at Port Macquarie, about 400 kilometers (250 miles) north of Sydney, on Saturday morning after the 35-year-old woman was attacked while surfing.

She was taken to a local hospital with serious leg injuries, but has since been flown to a nearby bigger hospital where she will undergo surgery.

New South Wales state police said the woman and a man were surfing when she was bitten on the right calf and the back of her thigh. Her companion then punched the estimated 3-meter (10-foot) shark until it let her go.

“We’ve had some really serious and tragic shark encounters over the past couple of months along the coastline, so to paddle out of your own safety zone, into an area where you know there is a large shark, I think is amazing … a tremendous act of bravery,” state Surf Life Saving chief executive Steven Pearce said.

Beaches in Port Macquarie have been closed for 24 hours as authorities attempt to track the shark.

There have been five fatal shark attacks in Australian waters in 2020, higher than the country’s average of three deadly attacks a year.