Peter McDonald's life wasn't always on the right track.
In 1990 he wound up in a 6-by-6 metre concrete cell in Wacol in Brisbane's south-west after doing "something stupid".
"I had to pay the price," Peter said.
It was a rude awakening for a young man from the outback Queensland town of Roma, about 500 kilometres west of Brisbane.
But life changed for the prisoner when an opportunity arose to see out his 18-month sentence in a work camp.
When he arrived in Charleville in south-west Queensland in the back of a van, he had no inkling his life was about to change for the better.
One prisoner with an idea
The Queensland Corrective Services (QCS) Prison Work Program was born during one of the toughest times in Charleville's history.
On April 21, 1990, after weeks of drenching rain in south-west Queensland, a final deluge flooded the region. In Charleville, the Warrego River broke its banks and at the same time flooded a channel behind the town.
Unprepared locals were caught between the two, and as the floodwaters tore through the town they scrambled for their lives.
The State Emergency Service (SES) worked hard to get people out of harm's way, locals navigated the flooded streets in boats, and helicopters flew from roof to roof to get people to safety.
Six hundred people were airlifted from the top of the pub, alone.
Then came the overwhelming clean-up task. More than 1,000 homes and businesses were damaged or destroyed and almost 3,000 people had been evacuated from the town.
That's when the emergency workers and volunteers arrived.
Back in Brisbane, one prisoner had an idea. He asked if inmates could help with the clean-up, and the Department of Corrections agreed.
The state's first work camp was launched in Charleville, when 40 prisoners arrived to lend a hand.
It allowed low-risk prisoners, like Peter, to serve out their sentence within the community while also developing new skills to prepare them for life outside of prison.
George Donohue headed the SES flood response to the disaster and worked with the first prison program.
"It didn't matter what you gave them: mud cleaning, cleaning out rotten food in fridges, fencing, yard work; it was a terrible job and everybody worked side by side," he said.
The work camps continued long after the floods and have become an institution in country Queensland, with 13 now across the state.
'I got my thoughts back'
Peter arrived six months after the flood, and while many homes had been cleaned up, businesses were still in need of help.
He spent his days driving a truck picking up rubbish and doing garden maintenance work for the local council.
"The work camp was a place for me where I got my thoughts back," Peter said.
"As far as I'm concerned, if I hadn't come out here, I would not like to think where or what I'd be doing now."
While Peter was grateful for the opportunity, so was the community.
Everywhere he visited, he was met with gratitude and "welcomed with open arms", Peter said, with the friendly Queenslanders often handing out alcoholic drinks, which he had to refuse.
But the biggest gesture was yet to come.
The joy of a second chance
Peter saw out his sentence in Charleville and then stayed on after a local businesswoman made him an offer he couldn't refuse.
When Joy Weir met Peter at the work camp, she offered to help him find a place to live and a job.
It proved to be a turning point in Peter's life.
"I wanted to get out and do more, help whoever I could," he said.
"I got a second chance and I never regret it."
Thirty years on, Peter still calls the town of Charleville home and for the past 18 months he has been delivering milk around town.
"I'm quite happy to stay here, I'll probably die here," he said.
The quiet intimacy of outback life in Charleville where everyone knows each other suits Peter.
"It has everything you need and most things you want," he said.
"In many ways I feel like I am a local."
To learn more about the remarkable people of Charleville, watch Back Roads on ABC TV, Mondays at 8pm or any time on ABC iview.