The sound of the click silenced the shouting and chaos surrounding him as he prepared for his final few moments of life.
But then nothing – except the return of the shouting and even more chaos.
Mr Maclachlan – one of the hero SAS soldiers who had rescued 12 hostages from the jungle in Sierra Leone during a previous tour – was already oozing blood from a head wound when his captors carried out the first of many mock executions in a Basra police cell.
This mental torture during his terrifying nine-hour ordeal, combined with growing frustration with inadequate Army equipment, led Mr Maclachlan to quit the SAS and embark on a new career.
The journey that led him into the hands of his captors had been remarkably routine.
That morning, he had set off with an SAS comrade to escort two MI6 agents to the Kuwaiti border to ensure them safe passage.
On their way there, their Army-supplied car broke down – nothing out of the ordinary for Mr Maclachlan, who had complained before about the faulty vehicle.
Stranded in the middle of nowhere, the pair were forced to hijack a taxi to continue with the journey. Their nightmare, however, started when they stopped at a police checkpoint, which turned out to be a set-up.
They were captured and marched into an outhouse beside the checkpoint where they were stripped, handcuffed and blindfolded.
They were then bundled into a car and driven to a police station, thrown into a cell where they were left with nothing but their thoughts and fears and the all-too-frequent sensation of a gun being pressed against their heads.
Outside there were riots, gunshots and explosions.
Mr Maclachlan, 35, said: "They had a pistol up against the back of my head, then there would be a click. There was lots of shouting, but I couldn't really tell what they were saying. They were going to execute us."
In the midst of the nightmare, Mr Maclachlan heard a British accent from outside – a British Army police officer on a routine visit – and shouted for help.
His captors jumped on top of him to silence him, but he continued to shout, explaining they were SAS soldiers being held hostage.
Although he was told by an Iraqi police chief that the soldiers were Egyptian terrorists, Mr Maclachlan's protestations managed to convince the officer to send for help. The next thing he knew, a tank was breaking down the wall of the police station and the two men were rescued and taken back to their base at Basra Palace.
Mr Maclachlan said: "I always thought as soon as I spoke to someone, they would realise I was British. But we had fake tan, hair dye – I was even driving an Iraqi taxi – because we were trying our best to fit in. But I managed to convince him."
He later learned they should have been killed straight away and had only been kept alive to be filmed for propaganda purposes. They would have died later that day.
After a 17-year Army career, the kidnapping was the last straw for Mr Maclachlan.
He said: "I went away to war with the SAS and was disillusioned by the kit and equipment and tactics and came out after that.
"I kept telling them about not having the correct body armour, cars not working etc, but there was nothing I could do about it. I was almost given enough rope to hang myself."
Mr Maclachlan, who lives in the New Town, spent seven years in the SAS, serving in Northern Ireland, Iraq, Afghanistan and Sierra Leone.
In Sierra Leone he was involved in a dawn rescue operation to free 11 members of the British Army's Royal Irish Regiment and their Sierra Leone army liaison officer in September 2000.
He was part of the 40-strong Operation Barras team of SAS soldiers and 130 paratroopers who swooped on the rebels – known as the West Side Boys – and successfully rescued all 12 hostages who had been held for 16 days.
Mr Maclachlan served for ten years in the Royal Scots before being accepted into the SAS.
As his former colleagues in the British Army finally pull out of Iraq – where he did three tours – he says only time will tell what impact the sustained military presence will have on the war-torn country. He said: "If they look back and they were going to do it again, they might change some of the tactics and some decisions they made, but it certainly hasn't done the British Army's reputation any harm. The British would have liked to have left earlier if they could have.
"But it's not just about providing stability, it's about the reconstruction process and making it safe enough so they can leave it to run itself."
Mr Maclachlan was just 15 when he was "dragged" into the Army careers office.
He said: "My mum had always wanted me to go to university and I had a choice of becoming a doctor, dentist or lawyer.
"But I didn't fancy any of those or going to university so we came up against each other. She said I had to be out the house by the time I was 16, so I got dragged along to the Army careers office."
Now he is doing what his mother dreamt he would do all those years ago – going to university – but he won't be studying law or medicine. By doing an arts and humanities access course at Newbattle Abbey College near Dalkeith, Mr Maclachlan will soon have the academic qualifications which his CV is currently lacking.
He has gained a place at Edinburgh University and will start his history and philosophy degree in September.
He added: "Normally I plan everything meticulously but in this sense I'm not that clear about where I want to be at the end of it."
ARMY 'NOT KEEPING UP WITH TIMES'
AT the inquest into the death of Corporal Mark Wright, the Edinburgh soldier who died in a minefield in Afghanistan in September 2006, the coroner said military chiefs should "hang their heads in shame".
Coroner Andrew Walker ruled Cpl Wright's death was caused by the "downwash" from a Chinook helicopter which had been sent to rescue a platoon of soldiers stranded in an unmarked minefield in the Kajaki area of Afghanistan's Helmand Province.
He said three factors contributed to his death: the lack of appropriate British helicopters fitted with a winch, the downwash from the Chinook sent to the minefield, and the administrative delay in sending a suitable helicopter.
The charge that British troops were being endangered by being sent to war with inadequate equipment has haunted the Ministry of Defence throughout the conflict.
Throughout the six years in Iraq the MoD has been forced to defend itself against allegations that soldiers lost their lives because they were denied the best equipment. Mr Maclachlan has experienced first-hand the Army's inability to kit troops out with the equipment they need. He said: "The British Army has been guilty of not keeping up with the times in terms of equipment and the role that they are taking on and I think a lot of that is to do with their procurement process and how they procure weaponry, clothing and body armour.
"From someone deciding they need a desert boot to that going on a private's foot takes something ridiculous like five to ten years.
"I was a commander of a vehicle and I didn't have the ability to see at night.
"We should not be putting people in that position."