BP employee Alan Wright, 37, was working at the plant in In Amenas on Wednesday when the Islamist terrorists stormed the compound.
The father-of-two hid in an office before joining Algerian colleagues in cutting their way through a fence and fleeing.
He told Sky News: "If you have been captured, there's pretty much no escape and it is going to take a miracle to get you out."
No Scottish residents died in the siege but two Scottish families have been told they lost a relative. Details have not been made public yet.
Mr Wright, of Portsoy, Aberdeenshire, was working on Wednesday morning when he thought the compound had experienced a power cut and believed it was "nothing serious".
Word soon spread they were under attack so he and three ex-pats and about a dozen Algerians holed up in an office.
The men were surprisingly calm, he said, "everyone went into safe mode" and they assessed what they were going to do and stocked up on supplies.
The group got a satellite telephone, taped up their window and locked the door.
Soon after they heard gun fire but could not tell how far away it was.
The terrorists had tried to clear all the buildings of workers and one of the jihadists patrolled the area outside their hideaway and tried to trick them out.
Mr Wright told the broadcaster a man walked past saying good morning in a very friendly Arabic voice.
"That was the first moment when we thought we are in big trouble here," Mr Wright said.
The terrorist "just walked past and...assumed the building had been emptied".
The group then spent a terrifying nine hours trying to stay out of sight and wondering what was happening.
At 6pm they left the office for another room and the ex-pats grew concerned that the Algerian nationals would leave them, as they were free to go, and inadvertently betray their position.
Mr Wright phoned home a few hours later to reassure his family, he said, although he was still in grave danger.
He said he did not want to speak to his two young daughters as he did not want his last conversation with them to be on a crackly phone.
In the morning, despite wanting to stay hidden, Mr Wright went along with a plan the nationals had to flee.
He was given a hat to wear to make him "look less ex-pat" and the group, which had now swollen to about 30, made a break for it.
They cut the perimeter fence but were still worried as the terrorists were dressed the same as the Algerian security forces so they had no real way of knowing who to trust.
"The first cut of the fence, the wire and tension makes such a noise when it breaks and you knew it travelled to where the terrorists were," Mr Wright said.
"But within 30 seconds they had both fences open and we were free to go, that was it."
Mr Wright said it was important not to run and attract attention to themselves.
"You know these guys are behind you and if they see you, you don't know if they're going to be shooting at you, you just don't know where everybody is...
"There was a mixture of relief, but you've no idea of what is out there.
"We got about a kilometre into the desert and you can see the military point with eight or nine military personnel with guns pointing into our spot but also that they had identified us and were making tracks to come our way.
"Then you think 'Is it the terrorists or is it the gendarmes?'
"And for 20 minutes you're still not sure - we're down on your hands and knees with our hands up."
The group was then split into Algerians and ex-pats and Mr Wright thought they had walked into the hands of the terrorists.
He said: "You're thinking you've just made the biggest mistake of your life...
"That was a horrible, horrible thing, that you have escaped then into the hands of the terrorists, or so we thought...
"You just think that's it... you fear the worst, you can't put into words how bad you feel, it's something you never want to go through again."
Mr Wright applauded the courage of his Algerian colleagues in helping the ex-pats escape, and he thanked the military for helping to save him.
He said: "The guys who had the option to surrender and be safe but decided to stay and help us escape, you'll be in debt to them for the rest of your life, the gendarmes as well, the military, if it wasn't for them it would have been a lot worse."
Mr Wright added that his thoughts were with those who had been killed.