(CNN) - Trapped beneath his 3-ton excavator in a watery pit, Daniel Miller survived by a nose.
The Australian man spent hours contorting his body to keep his head barely above the muddy water before rescue teams arrived to free him.
It happened Tuesday when Miller, 45, was riding his excavator around his property 180 miles north of Sydney. He was riding beside a dam when it gave way, tumbling the excavator into a muddy pond and pinning Miller beneath one of the bars attached to the machine.
He had to heavily arch his back to keep most of his face above water. Finally, a neighbor 500 meters away heard his calls for help.
"I was trapped and had to keep my head up above water using my arms. I guess it was the cobra position," Miller told Sydney's Daily Telegraph. "I'm not a yogi but I guess you could say yoga saved my life. That and the will to live."
Miller's wife, Saimaa, said on Facebook that her husband was trapped for five hours, although rescue crews said it was more like two hours. Either way, police chief inspector Neil Stephens said, "He's been extremely lucky to survive."
"Thank God it didn't rain," Miller added. "My nose was grazing the water the whole time."
Fire and Rescue New South Wales deputy captain Steve Howard said, "How he kept his back arched with his nose above the waterline was quite incredible for that amount of time."After he was freed, Miller was taken to a hospital by helicopter. He was treated for hypothermia and minor back injuries.
"Dan is OK!... Legendary effort from a legendary man," his wife said on Facebook.
Miller told the Daily Telegraph he had promised his wife he wouldn't die before her.
"I wanted to honor my vows --- the whole time I was trapped I kept thinking of her and my two young children," he said.