A 77-year-old grandfather was attacked by a shark off the coast of Australia over the weekend and escaped by hitting it on the head.

Richard Stubbs, 77, was snorkeling 160 feet offshore in Yallingup Lagoon in southwest Western Australia when a 6-foot-long wobbegong shark attacked and bit him on the leg. His grandfather then started punching the shark in the head until it let him go, and he managed to escape and return to shore with the help of friends he was swimming with.

It was a wobbegong shark, a group of 12 species of carpet sharks found in the waters of Indonesia and Australia. They are usually bottom dwellers, spending most of their time near the seafloor and feeding on small fish and crustaceans.

“Suddenly, something hit me, hit my leg hard, and I thought, ‘What is that? Stubbs told an Australian television station. “I was terrified.”

” In reality, I didn’t know what to do. It was very instantaneous,” Stubbs added. After the shark attack, he was left with a deep wound on his right calf.

He thanked his friends who helped him out of the water. ” If you think about it, I was just lucky to have that kind of support and the people I had around me,” he said. “I love them.”

Wobbegong sharks typically grow to 4 feet long, but some species, including the spotted and striped wobbegong shark, can reach 10 feet long. They have many whiskers growing around their jaws, which serve as camouflage when hunting prey and as a means of detecting their surroundings.

In most cases, wobbegongs pose little danger to humans as they are not aggressive, but they have been reported to attack humans if they come too close occasionally. The Florida Museum’s International Shark Attack Archive lists 31 wobbegong attacks, none fatal.

The attack on Stubbs came just two days before a great white shark attacked another swimmer in Australia. A 20-year-old man was bitten on the leg about 2,000 feet off Gnarabup Beach, also located in Western Australia.

According to local TV station 7NEWS, the young man survived but lost a lot of blood, and local beaches have been closed until further notice.