An Australian teacher who spent more than three years being held hostage by the Taliban believes US Navy SEALs tried and failed six times to free him.

Key points: Mr Weeks and his American colleague were abducted in 2016 in Kabul where they both worked as teachers

Mr Weeks and his American colleague were abducted in 2016 in Kabul where they both worked as teachers He said they were moved around various locations in Afghanistan and Pakistan

He said they were moved around various locations in Afghanistan and Pakistan But he never gave up hope of being rescued

Speaking publicly for the first time since his release last month, Timothy Weeks described hearing explosions and machine-gun fire during one of the attempts.

"I believe, and I hope that this is correct, that they came in six times to try to get us, and that a number of times, they missed us only by hours," he said.

Mr Weeks and his American colleague Kevin King were abducted in 2016 outside the American University in Kabul where they both worked as teachers.

Both men were released as part of a prisoner swap last month.

Mr Weeks described one incident in April this year where he believed Navy SEALs attempted to rescue him.

Timothy Weeks was kidnapped by the Taliban in Kabul in 2016. ( YouTube )

He said he was woken at 2:00am by his guards, who told him they were under attack by "Daesh" (Islamic State) and hustled him into a tunnel under where he was being held.

"I believe now that it was the Navy SEALs coming in to get us," he said.

"I believe they were right outside our door.

"The moment that we got into the tunnels, we were one or two metres underground and there was a huge bang at the front door.

"And our guards went up and there was a lot of machine-gun fire.

"They pushed me over the top into the tunnels and I fell backwards and rolled and knocked myself unconscious."

Some Taliban guards were 'lovely people'

Space to play or pause, M to mute, left and right arrows to seek, up and down arrows for volume. Watch Duration: 1 minute 4 seconds 1 m 4 s Timothy Weeks says there is 'nothing in the world' he needs after being freed

Mr Weeks said he and Mr King were moved around various locations in Afghanistan and Pakistan during their captivity, and their lives were at risk on a daily basis.

But he said he never allowed himself to give up hope of being rescued.

"I never, ever gave up hope, and I think in that sort of situation, that if you give up hope, there is very little left for you," he said.

"I knew that I would leave that place eventually. It just took a little longer than I expected."

Mr Weeks thanked all those involved in his rescue, including Prime Minister Scott Morrison and US President Donald Trump.

But he also thanked the leader of the Taliban and his Taliban guards, who he said treated him well.

"I know a lot of people don't admit this, but for me, they were soldiers," he said.

"And soldiers obey the commands of their commanders. Then don't get a choice.

"They were there because they were ordered to come and look after me.

"I don't hate them at all. And some of them, I have great respect for, and great love for, almost.

"Some of them were so compassionate and such lovely, lovely people.

"And it really led me to think about… how did they end up like this?"

He said the resumption of talks between the US, Taliban and Afghan Government following the prisoner exchange brought him "great joy".