Firearms officers in Birmingham nearly gunned down one of the alleged July 21 bombers on arrest when they found him standing in a bath wearing what they feared was a rucksack filled with explosives, a court heard yesterday.

Wearing full body armour and helmets, and heavily armed, they burst into a house where Yassin Omar was hiding during a dawn raid in the city on July 27.

His arrest came six days after the alleged extremist Muslim plot to blow up parts of the London transport network failed.

Specialist police officers told Woolwich Crown Court how stun grenades were thrown into every room before a violent struggle ensued with the defendant. One officer said he punched 26-year-old Omar – who was fully clothed – in the face while another repeatedly stunned him with a Taser gun.

At one point another officer had the safety catch off his sub-machine gun and was aiming his weapon at the back of Omar’s head. Only identified as PC 7512, he told the court: "In all honesty, I still don’t know to this day how I did not shoot him."

Omar was eventually dragged out of the bathroom to the kitchen where his trousers and shirt were ripped off and the rucksack cut from his back.

Evidence about the dramatic arrest came from three officers from the firearms operational unit of West Midlands Police who stormed the house on Heybarnes Road, Hay Mills.

The court was told how Omar fled London the day after the alleged attacks by disguising himself in a burkha and travelling to Birmingham by bus. He sought refuge in the unobtrusive red brick terraced house until he was tracked down by police, the court was told.

Twelve armed specialists stormed the house just after 5am on July 27 after being given intelligence that the suspect was there.

All were dressed in black overalls, body armour, helmets and carrying Heckler and Koch carbine sub-machine guns as well as Taser stun guns, the jury was told.

Omar, from New Southgate in north London, is one of six defendants who deny charges of conspiracy to murder and conspiracy to cause explosions likely to endanger life.

His co-defendants are Muktar Said Ibrahim (29) of Stoke Newington, north London, Adel Yahya (29) of High Road, Tottenham, north London, Manfo Kwaku Asiedu (33) of no fixed address, Hussain Osman (28) of no fixed address and Ramzi Mohammed (25) of North Kensington, west London.

The first officer to give evidence was Pc 7512, who said he spotted Omar in the bathroom. He told how as he opened the door, the room was plunged into darkness because the light cord was wrapped round the inside door handle.

Pc 7512 and fellow officer Pc 5566 threw a stun grenade inside, which set off an "extremely loud bang".

Relying on torches attached to their guns and helmets, the court heard they burst into the room to find Omar standing in the bath, facing the tiled wall with the rucksack on his back. Shouting "armed police – show your hands" they forced Omar to lift his arms in the air, the jury heard.

"I had grave concerns about the rucksack on his back," Pc 7512 told the court. "I brought the point of my aim to the back of his head, during which time his hands disappeared towards his chest. At this point I formed the opinion that I was going to have to shoot this man."

After much shouting, Omar lifted his hands in the air for a second time and the officer replaced the safety catch. The trial was adjourned today.