(CNN) -- Three BBC journalists released from detention in Libya told Wednesday of beatings and mock executions that they and other detainees were subjected to by their captors.
The three -- Feras Killani, Goktay Koraltan and Chris Cobb-Smith -- described how Libyan authorities seized their cameras and other equipment Monday at a checkpoint six miles south of Zawiya, a scene of heavy fighting between government and rebel forces.
Even though all three had BBC identification cards, they were transported with their local driver to a barracks where they received coffee and cigarettes until a Libyan officer arrived.
Killani, who is Palestinian, said the officer singled him out and criticized Palestinians.
"When I tried to respond he took me out to the car park behind the guard room," Killani said, according to an interview transcript provided by the BBC. "Then he started hitting me without saying anything. First with his fist, then boots, then knees. Then he found a plastic pipe on the ground and beat me with that."
It was the first of several beatings Killani would endure, according to the men.
"We were shocked when we saw him," Koraltan said of Killani after one of the beatings.
To Killani, "it made it worse that I was a Palestinian and they said 'you're all spies.' Sometimes they said I was a journalist who was covering stories in a bad way."
The three journalists and their driver eventually were transported by road to another building where they saw and heard other detainees being beaten. During the ride, a guard pointed an AK-47 assault rifle at them, they said.
Next stop was a military compound with an eagle on the gate, Cobb-Smith said, but they ended up in "dirty scruffy little compound" down a back street.
"There was a big iron gate. It looked like a film set, like an execution place," Koraltan said. He, Cobb-Smith and the driver were put in a cage in the middle of the compound, and "the last thing I saw before the door shut, they hit Feras with an AK-47. We started hearing him groaning."
Killani described the beating as four or five men kicking and punching, then cocking guns as if to shoot him.
"It was a fake execution," he said, adding he was then taken into a room and beaten again.
"They were saying I'm a spy working for British intelligence, they asked me about the $400 and 60 pounds and some dinars I was carrying," Killani said. "They asked if I was given the money from the intelligence department I worked for."
Meanwhile, Killani's colleagues out in the cage were put in masks taped to their heads and handcuffed, Koraltan said.
"They said in Arabic 'go.' I thought they would shoot us from behind," he said. "I was saying in Turkish that I'm a friend. I thought they would shoot us, I could hear guns loading. I was scared to death. I thought it was the execution moment."
No shooting occurred, though, and the driver was taken elsewhere while Cobb-Smith and Koraltan rejoined Killani
"His face was pale, and twice the size," Koraltan said.
Eventually Killani was taken to another room, and Koraltan and Cobb-Smith saw other detainees who were brought to their room, including a man from Zawiya.
"He was terrified. He prayed all night. He peed himself. They threw the mattress out," Koraltan said. "He kept making throat slitting gestures as if he knew he'd die, but he made it clear those gestures applied to us, too. The guards kept coming in, screaming at him, terrorizing him."
This went on for hours, the men said. Cobb-Smith described smoking cigarettes and then the butts on the floor.
Killani meanwhile, said he spent the night in a cell with several men from Zawiya who had been masked, cuffed and beaten.
"The four who were masked said they had been three days without food and with arms and legs cuffed," Killani said. "They said where they were now was like heaven compared to where they had been. They said they had been tortured for three days."
Hours later, around 3 a.m., the three journalists and their driver were reunited and crammed into a cab of a pickup truck with other detainees.
"We were crammed in worse than sardines," Cobb-Smith said. "The others were so badly beaten, and it was so full, that every time you moved someone screamed. They had mashed faces, broken ribs. We were handcuffed, really tightly, behind our backs."
They wound up at a building they didn't know that they believed was the headquarters of the foreign intelligence service, the men said.
Lined up facing a wall outside, they were guarded by a man with a small sub-machine gun equipped with a silencer, they said.
"He pointed the barrel at each of us," Cobb-Smith said. "When he got to me at the end of the line, he pulled the trigger twice. The shots went past my ears."
The situation then changed, with a man who spoke good English arriving to question them and provide cigarettes, tea and coffee. Hours later, they were returned to their hotel and released.
"One man said to me, sorry, it was a mistake by the military," Killani said. "But he said you were wrong first because you went out without permission."