A fisherman was attacked by a shark and suffered deep puncture wounds on both legs while fishing in shallow waters off the coast of New South Wales, Australia.

Alan Saunders was involved in the seasonal mullet run and was removing a Grey Nurse shark caught in a fishing net at Crowdy Head beach on Sunday 21 April.

His brother, Ray said he was attacked while releasing one of three sharks caught in a fishing net.

"Alan was involved in removing one of the sharks out of the wings of the net.

"He released that shark but another shark came in and bit him on both legs."

Emergency services including surf life savers were quickly on the scene. The 51-year-old was flown by the Westpac Rescue Helicopter to hospital for treatment to puncture wounds and lacerations to his legs.

The three-metre long shark was described as a Grey Nurse, common off the east coast between central Queensland and southern NSW.

Scientists have found they are generally not a threat to swimmers unless provoked. Ironically, the sharks are under threat because they are often caught in the nets of commercial fishermen.

According to National Geographic, only 12 humans were killed worldwide by sharks in 2011.

How to avoid a shark attack

There are ways to minimise the chance of encountering a shark, advises the National Geographic.

Stay away from the mouths of rivers after heavy rains, when freshwater fishes and other animals are swept out to sea.

Swim clear of fishing boats. They often trail fish remains and blood, which can draw sharks.

If you're bleeding, including menstruating, stay on the beach. Sharks can smell and taste even the smallest amount of blood from over a mile (1.6 kilometres) away and trace it back to its source.

If you cut or injure yourself in the water, get out! Do not stay in the water with blood around you.

Stay out of the water if fish blood or baitfish are present. In other words, steer clear of fishers.

Avoid large groups of fish, seals, or sea lions. They all are prominent on the shark's menu.

Stay away if you see large groups of dolphins and seabirds. They are attracted to the same food sharks eat. Don't make the mistake of thinking that if dolphins are present, there won't be any sharks around. Dolphins can be prey for large sharks.