A British Muslim accused of helping the July 7 bombers plot their attacks on London told a court yesterday how he and ringleader Mohammed Sidique Khan spent time at a Taliban camp in Afghanistan as part of a jihad training trip.

Taking the stand for the first time, Waheed Ali, 25, denied participating in the attacks but admitted travelling with Khan on a "gallivant" in the summer of 2001, shortly before the September 11 attacks, and after attending a camp on the Kashmir border where they learned to shoot Kalashnikovs.

They hoped to go to the frontline near Bagram airbase where the Taliban were fighting the Northern Alliance, but were deemed too inexperienced to fight and stayed at a camp about a mile behind the frontline, where they became so ill with diarrhoea that they were put on drips for three or four days.

Khan recovered enough to visit the frontline a few times but Ali stayed behind helping the cooks by chopping onions.

Ali told the jury how he came to the UK from Bangladesh as a three-year-old, and his parents died within a month of each other about a year later. He was brought up by foster parents, who he claimed used to beat him, and left school with only an F grade in English.

He was "looked after" by his best friend, Shehzad Tanweer, nicknamed Kaki, who went on to become the Aldgate bomber, killing seven passengers and himself.

"We used to do normal kiddie stuff, play football and cricket with all the local lads. I was quite childish back then, I think, I probably still am now, and Kaki was more mature."

Tanweer would lend him money, clear up after him and even finish fights for him, he said. The pair played cricket on the day before the July 7 attacks in 2005.

Ali described how Tanweer had been so religious as a teenager that other children gave him the nickname "Pious".

"He used to pray five times a day, and he was growing his beard at 14 or 15."

Ali started practising Islam strictly at the age of 17, after meeting Sadeer Saleem, another defendant. Saleem talked to him about religion and suggested he go to the Islamic Iqra bookshop, where he worked. When he went in one day, Saleem lent him videos of Muslims fighting in Chechnya.

Posters of hip-hop stars such as Tupac Shakur, the Brazilian football team and boxers Mike Tyson and Mohammed Ali once decorated his bedroom walls, but were replaced with images of Kalashnikovs.

Ali said he watched the videos with Tanweer. One day he mentioned to Tanweer that he wanted to go and fight, the next day his friend told him he should speak to Khan, who was arranging the trip to a training camp in Pakistan.

Ali, Mohammed Shakil, 31, and Sadeer Saleem, 27, all of Beeston, Leeds, deny conspiring with Khan, Tanweer, Jermaine Lindsay and Hasib Hussain to cause explosions between November 17 2004 and July 8 2005.

The prosecution has alleged a trip they made to London in December 2004 with Hussain was a "hostile reconnaissance mission" scouting for possible targets.

Ali said the trip had been planned because he wanted to see his older sister, who was living in a hostel in the East End, and he had offered to pay for the petrol if Shakil drove him. He spent the afternoon there playing board games and reading with his nieces, he told the jury.

His defence barrister, Michael Wolkind QC, asked: "Did you take part in any terrorist planning in London?"

Ali replied: "I swear I did not."

The group ended up staying the night and spent their second day visiting the London Eye and the London Aquarium. Ali insisted he never went on the tube.

He said he was disappointed by the Eye: "I'd give it three out of 10." Of the aquarium, he said: "It was worse than the ride on the Eye. I'd give it one out of 10. It was just fish swimming around."

He told how he and Khan flew to Islamabad in July 2001, where they were collected by members of the group Harkat-ul-Mujahideen and driven to the training camp at Mansehra on the border with Kashmir. There, they got special treatment, including their own hut, eggs for breakfast and a personal teacher.

"There were about 200 brothers there and we were treated differently because we were from England," Ali said. "The others slept 20 to a tent, but we had our own hut with two brothers from the United Arab Emirates."

He insisted that he disapproved of the 9/11 attacks, because suicide bombings and killing innocent people was forbidden in Islam.

The court heard that in 2004 another trip to Pakistan, lasting several years, was being planned. Khan and Tanweer became closer, Ali said, and the plan changed so that they would go out together first, Ali and Saleem would follow, and Hussein would travel last.

When Ali and Saleem eventually got there, they spent several weeks at a camp before Khan and Tanweer came and told them they were returning to the UK.