Barefoot, hungry and alone, a 63-year-old British tourist saved himself by scrawling a desperate message in the sand.

Geoff Keys was rescued after two days in the Australian outback when a search helicopter spotted his “HELP” message on the beach in late July, Sky News reported.

The retired mechanic was attempting a shortcut back to camp in the 900-square-mile Jardine National Park in north Queensland when he got off track, leading him to endure a tough ordeal without food, water or shelter. Wearing just a T-shirt, swimming trunks and a hat, he wandered directionless, until Keys heard helicopters overhead, ostensibly searching for him.

“I feel stupid, but lucky”

- Geoff Keys

“It meant that I had been reported missing by my friend and also brought home to me what a terrible night they must have had, wondering where I was,” Keys wrote on his blog.

So Keys made his way to a sandy embankment and wrote “HELP” -- with an arrow pointing to where he was resting.

After another night alone, a chopper spotted the message and then began searching for the weary survivor.

Keys said when he saw the helicopter he tried attracting its attention by waving his hat, hoping the crew would notice him.

“[The helicopter] came around again while I continued to jump up and down like a lunatic and this time someone waved to me out of the window,” Keys wrote. “My ordeal was over.”

The fatigued adventurer, who was later treated for exhaustion, dehydration and cuts on his feet, had to be hoisted into the helicopter from the water. Police say the rescue cost $800,000.

“It’s safe to say that I’m very grateful to everyone involved in my rescue,” Keys wrote. “Their skill and professionalism is incredible.”

He added: “I feel stupid, but lucky.”