A Navy diver has undergone emergency surgery after fighting off a shark off Woolloomooloo in Sydney Harbour this morning.

The 31-year-old was brought to St Vincent's Hospital in a critical condition about 7:00am (AEDT), with severe injuries to his right hand and right thigh.

The hospital has not confirmed reports that the man lost his hand. It says he is in a serious but stable condition in intensive care.

The Navy says the specialist clearance diver was rushed to hospital from Woolloomooloo Bay, in Sydney's inner east, after being bitten off the naval base at Garden Island.

The Commander of the Australian Fleet, Rear Admiral Nigel Coates, says the 31-year-old was on the surface of the water with a police diver on the last day of an international counter-terrorism exercise.

"It all happened very quickly, I'm told," he told ABC NewsRadio.

"He fought the shark, punched it a few times. The shark disappeared.

"Our diver then swam to our nearby safety boat, which wasn't far away.

"The people on the safety boat got him into the boat, they applied some first aid, rang 000 and got him ashore to an ambulance and up to St Vincent's as fast as they could."

The man was involved in a Defence trial of new technologies designed to protect ports, naval bases and ships from underwater attacks. The last day of the exercise has been suspended.

Rear Admiral Coates says it is the first time an Australian Navy diver has been attacked by a shark.

He says the Navy will review its diving operations.

"When something like this happens, we've got to sit back when the facts become clearer and try to understand what happened and see whether there's ways we can reduce the risk of that ever happening again," he said.

Bull shark suspected

The curator of the Australian Shark Attack File at Taronga Zoo, John West, says no-one has been bitten by a shark in Sydney Harbour since the late 1990s.

"They're very, very uncommon," he told ABC 702 Local Radio.

"We've got to go back 12 years until we find where a swimmer was bitten up in Parramatta River.

"Then there's a couple in between, in 2002 and 2000, where rowers had their paddles or their skis bitten by a shark up in Parramatta River."

Mr West says the shark was most likely one of the bull sharks that feed in the harbour at this time of year.

"The bull shark occurs in the estuaries along the east coast of Australia every year and around this time," he said.

"All of the bites from bull sharks occur in February and March. Usually there's more swimmers in the water around that time.

"The sharks appear in the harbour every year and the bull shark in particular will swim all the way up the Parramatta and Lane Cove rivers, so I'm not surprised that they're in the harbour."

He says the last fatal attack in Sydney Harbour was in 1963, when Martha Hathaway was killed by a bull shark at Middle Harbour in 1963.