(CNN)It was supposed to be a solitary day of fishing.
But an off-duty Australian wildlife ranger caught more than he bargained for when he was attacked by a crocodile -- and lived to tell the tale after poking it in the eye to make a narrow escape.
Craig Dickmann, 54, was fly fishing alone on a beach in Cape York, Queensland state, on Sunday when the 2.5-meter-long (8.2 feet) reptile lunged at him, according to CNN affiliate 7 News.
The crocodile grabbed the ranger by his legs and hand, and tried to drag him down, 7 News reported. Dickmann scuffled with the crocodile, then gouged it in the eye -- which finally forced the beast to release him from its jaws.
"I can only imagine it was a life or death response," said Queensland Ambulance Service Superintendent Warren Martin.
Dickmann was severely injured, with a bite on his hand ripping open skin to expose tendon and muscle, Martin said.
The ranger was an hour from home and any help -- so, with two injured legs and a mangled hand, he drove his car home, where a neighbor helped tend to his injuries.
He was then airlifted to a hospital in the Queensland city of Cairns, according to the state's Department of Environment and Science (DES).
Dickmann has now undergone surgery and is in a stable condition, 7 News reported.
Captain Billy's Landing, where Dickmann had been fishing, has been closed for an investigation, the department said. According to DES, any crocodiles displaying "dangerous behavior" are targeted for removal under the state's crocodile policy.
"It could quite easily, if luck had been a little bit against him, have gone the other way," Martin said.