Image caption Yoann Galeran said he was "very lucky" to be alive

A Frenchman has managed to escape a saltwater crocodile that latched on to his head as he swam in Australia's Northern Territory.

Yoann Galeran, 29, said he was "very lucky" to have survived the attack.

He was swimming from shore in the remote town of Nhulunbuy to retrieve a dinghy when the crocodile - estimated to be 2.5m (8ft) in length - attacked him on Sunday.

He needed stitches for bite wounds on his head, neck and shoulders.

Media playback is unsupported on your device Media caption "I think I maybe scared him"

Mr Galeran, a deckhand, said he kept punching the crocodile as it tried to roll and drown him.

"It went straight away to the top of my head and diving under the water he tried to do that spinning thing," he said.

But he fought his way free and made it to the dinghy, and then back to shore.

"I just feel that I've been lucky and I just think [if it was] a bigger crocodile, I maybe wouldn't have any head," he told ABC News.

A Northern Territory official echoed Mr Galeran's sentiment, saying the outcome could have been "a lot more dire".

Lisa Heathcote, Mr Galeran's boss, said the crocodile had been in the area for weeks.

"We've walked out on the back deck and Jo's [Yoann] standing there with a big grin on his face and blood pouring out of him," she told ABC News.

Fatal attacks in Australia by saltwater crocodiles - a protected species since the 1970s - remain rare.

Image caption Mr Galeran said the crocodile clamped down on his head and neck and attempted to drown him

But the crocodiles are especially abundant in the Northern Territory, where deadly encounters have been reported.

A boy was killed in December after he was dragged into the water by a crocodile at a swimming spot. Weeks before the incident, human remains were found in a crocodile's stomach in the state after a girl disappeared.