A Swedish man who was held hostage by al-Qaeda in Mali for nearly six years said he "pretended to be Muslim" to survive.

Johan Gustafsson, who was freed in June, was held by Islamist militants for almost six years after he was seized in the Islamic Maghreb (AQIM) in 2011. He was kidnapped along with two other men in Timbuktu, northern Mali, while they were on a motorcycle tour en route to South Africa.

His fellow hostage Dutchman Sjaak Rijke was freed during a raid by French troops in 2015. The third hostage, South African Stephen McGowan, was released last week.

Gustafsson, 43, has spoken publicly to Swedish media for the first time since his release. At a press conference on Thursday 10 August, he spoke about his six-year captivity and how he had convinced his captors that he was a Muslim.

Johan Gustafsson
Swede Johan Gustafsson was released on 26 June after being held hostage by al-Qaeda for almost six years REUTERS/TT News Agency/Vilhem Stockstad

"I told them I wanted to convert to Islam. That was the only thing I could think of that would buy me some time, even though I did not have much hope that it would work," he said.

"I prayed with them and ate with them. I acted like they do. I acted like I'm an ordinary Muslim, not like a jihadist," he explained. "During this time you get to know them. I felt inside of me that they are the enemy, but if there is anything I can do I do it."

Gustafsson said that after he had proved his devotion to Islam, his captors allowed him to pray with them and walk around the hostage camp freely.

"I didn't know anything about Islam, so I'm not sure how believable it was. But I think they saw it as their duty to accept it, even though I have a hard time believing that they actually believed me," he said.

The Swede said that he was continuously plotting his escape and that once he managed to leave the camp while his kidnappers were distracted. He walked through the desert for two days before they found him again and drove him back to the camp.

Gustafsson also spoke about his release, saying he had "tears in his eyes" when he saw police officers waiting to escort him from the camp.

The Swedish government does not pay ransoms for hostages. Gustafsson said he hoped that a ransom had not been paid in exchange for his release, adding that he still did not know why his captors agreed to hand him over to Sweden.

"I hope they were just really fed up with me," he joked.

Johan Gustafsson
Johan Gustafsson (C) spent almost six years as an al-Qaeda hostage in Mali. He said he "pretended to be Muslim" to survive MARCUS ERICSSON/AFP/Getty Images