A British survivor of the Algerian gas plant siege described on Sunday a nerve-racking escape across a stretch of desert and a moment of terror when he feared he had fallen into the hands of the hostage takers.
The Algerian authorities say at least 23 hostages and 32 militants were killed in the four-day siege, a preliminary death toll they expect will rise when they have finished clearing out the remote gas plant deep in the Sahara. Hundreds of Algerian workers and scores of foreigners escaped.
Alan Wright, now safe at home in Aberdeenshire in northern Scotland, told Sky News television he hid in an office block within the In Amenas complex for a day and a night with three other expatriate workers and a group of Algerian colleagues.
Cut off from the world, the men could hear sporadic gunfire throughout the first day of the crisis. During the night, which was quieter, he briefly called his wife who was desperately waiting for news at home with the couple's two daughters.
"She asked if I wanted to speak to Imogen and Esme and I couldn't, because I thought, I don't want my last ever words to be in a crackly satellite phone, telling a lie, saying that you're OK when you're far from OK," Wright said.
Early the next morning, hours before the Algerian army began storming the compound, the Algerian workers hiding in Wright's block decided to try and escape.
"The national employees had convinced themselves that there was nobody going to come and get us, we weren't going to be rescued because they didn't know where we were. So they decided that they were going to cut the fence and make a break for it.
"When you don't know what's out there and you know the terrorists are dressed the same as the security forces, it was a huge decision, do you stay or do you go?"
Wright said he wanted to stay at first, but in the heat of the moment he and the other expatriates decided to follow.
The men cut through two wire fences. Within 30 seconds they were out in the desert and running away. Wright said the group of about 30 men got about a kilometer away when they saw a group of uniformed men in arms coming towards them.
"Is it the terrorists or is it the gendarmes? And for 20 minutes, half an hour, you're still not sure," said Wright.
He said the fugitives got on their knees with their hands up as the men approached. They were called up one by one and searched, and the foreigners were separated from the Algerians.
"We were put to one side ... and then you're thinking 'You've just made the biggest mistake of your life', because there's only one way they're separating us and it's because they (the Algerian workers) are going to be free," said Wright.
"So that was a horrible, horrible thing in that you've escaped but you've escaped into the hands of the terrorists, or so we thought ... If you'd been captured there's pretty much no escape, you know it's going to take a miracle to get you out."
The horrible moment lasted for about two minutes, until some of the Algerian workers began to chat with the armed men and he realized they were in the hands of the Algerian army.
"I can't put it into words," he said. "You just sort of hope in the back of your mind that you are going to see your family and your friends again."
Wright said he would forever be in debt to the Algerian workers who could have surrendered to the attackers and given up the expatriates but instead decided to flee with them.
"The guys that were with us who had the option to surrender and be safe but they decided to stay and help us escape, you'll be in debt to them for the rest of your life."
He described the community of workers at the remote complex as close-knit. Expatriates and local workers used to play football and card games against each other.
"It's quite competitive football matches - expats vs nationals - as you can imagine it's like a Scotland-England match sometimes," he said. "We were playing football on Tuesday night together and now you don't know who's home and who's not home. It's horrible, a horrible feeling."
Asked whether he thought the Algerian rescue operation had resulted in unnecessary loss of life, Wright disagreed.
"You can guess at that. By the same token if they'd just left it to negotiate more lives could have been lost, you can't say for sure. They managed to rescue quite a lot of people, so bless them for that.
"My thoughts are with the guys who weren't as fortunate as us. That's something that's still going to hit me very, very hard. These are all my very, very good friends unaccounted for and my thoughts are with their families just now."