The following correction was printed in the Guardian's Corrections and clarifications column, Friday July 13 2007

Boiling hydrogen peroxide solution would increase the concentration of hydrogen peroxide, rather than reduce it, as we suggested in the report below.

Imam Sayed Bukhari was leaving his mosque when the angry young man approached him. "I want to talk to you," he said. When the imam refused, Yassin Omar turned on his heel, shouting a warning: "Stop misleading the people, imam."

What had incensed him so much was a sermon in which Imam Bukhari told his congregation in Finchley, north London, that suicide bombings were against the teachings of Islam.

A few months later Yassin Omar showed Imam Bukhari just what he thought of his words. Strapping a rucksack filled with 5kg of high explosive on to his back, he boarded a tube and attempted to detonate a hydrogen peroxide bomb at Warren Street station.

His three friends did the same; sending a succinct message of hate to the society that had given them refuge as children from the wars gripping Somalia, Ethiopia and Eritrea.

The July 21 bombers were a motley crew; a drug taker and thief, a travelling salesman, a disillusioned student and a keen football fan, all united in their commitment to extremism, the court was told.

Omar had escaped the civil war in Somalia, where he was born on New Year's Day in 1981, and arrived in the UK via Kenya with his two sisters, Salma and Miriam, in 1992.

As a 12-year-old refugee he received the support of the social services and was placed with an experienced foster couple, Bernice Campbell and Stephen Lamb, both committed Christians, at their home in Winchmore Hill, north London.

Mr Lamb said he was a bright young boy but perhaps not surprisingly was unwilling to talk about his past in Somalia, where his parents are thought to have been killed. As he grew up, Omar began pushing the boundaries and showing a growing disrespect for women.

"His sisters weren't able to discipline him because he was a male and of higher social standing," said Mr Lamb. "Bernice had reservations about him. He wasn't comfortable with rules, boundaries, if they were set by her."

Omar's foster parents sent him to the local comprehensive, Aylward School, where he showed an early talent for football. As he entered his teens, Omar hooked up with another pupil, Matthew Dixon, and the pair became friendly with Steven Bentley, a boy from a nearby school.

The teenagers spent most of their spare time playing football, going to the cinema and clubbing. But Dixon and Bentley said in court that Omar became noticeably more religious when he left school at 16. With his two GCSEs Omar went to study for a GNVQ in intermediate science at Enfield College. At the same time Omar's respite with his foster parents who had a steadying effect on his life, came to an end.

At 18, as a "vulnerable young adult" he was provided with benefits and given a council flat on the ninth floor of Curtis House, New Southgate, by Enfield borough council. Living on state handouts, Omar, who was given indefinite leave to remain in the UK in 2000, used his flat as a hangout for his friends.

On the shelves in the flat, tucked alongside Hollywood films such as The Shawshank Redemption and CDs of Pure Garage 2 and Michael Bolton, Omar's new interest in extremist Islam was becoming more evident, the court heard.

He built a library of DVDs and videotapes which contained violent images of fighting in Chechnya, beheadings and killings and the extremist rantings of two London-based clerics, Abu Hamza and Sheikh Abdullah al-Faisal. Omar read the literature, watched the films and steeped himself in the hate-fuelled beliefs of Hamza and Faisal. He told his brother-in-law the 9/11 attacks were a "good thing" and began attending Finsbury Park mosque to see Hamza preach, staying behind to talk to the imam after Friday prayers.

Five years before the July 21 attacks, Omar met fellow Hamza devotee, Mukhtar Said Ibrahim, while playing football in a Muslim league in north London.

With his parents and family, Ibrahim had fled war-torn Eritrea in 1990 at the age of 12. The family lived in Harrow where the young boy fell into the company of a street gang and started drinking and smoking cannabis.

A pupil at Kingsway School, King's Cross, Ibrahim was a dull, almost backward young boy. At 15 he and another gang member attacked a 15-year-old schoolgirl, forcing her up an alleyway at Queensberry Circus in Wembley where Ibrahim pushed her against the wall, fondled her breasts and rubbed his groin against her, the court heard. A few months later Ibrahim left school with two GCSEs and started a course in leisure and tourism at Harrow Weald College.

Within three months, Ibrahim was in trouble with the police again after attacking and robbing a 77-year-old woman at Southgate tube station at midnight in April 1995. Less than a month later, he joined in a gang robbery of two men in Hertfordshire, in which one victim was threatened with a knife and a bottle, the court heard. For both attacks he was sentenced to five years in a young offenders' institution.

Inside the crammed confines of Feltham and other institutions at Bedford, Henley-on-Thames and Milton Keynes, Ibrahim came into contact with radical imams.

Like Richard Reid, the shoe bomber, Ibrahim emerged from Feltham in September 1998 at the age of 20, having rejected crime in favour of extremist Islam.

He lived in a council flat in Stoke Newington, paid for with housing benefit, and spent his time hanging out with Omar and his friends and visiting Finsbury Park, the court heard. While claiming unemployment benefits, he earned money working in fast-food restaurants and selling African handbags on Dalston market. He also forged immigration documents for himself and others.

It was at Finsbury Park mosque that Ibrahim and his friends met the other two would-be bombers, Ramzi Mohammed and Hussein Osman.

Osman was born Isaac Adus Hamdi in Ethiopia in 1978. He and his family fled to Italy in the 80s, before Osman and another brother came to the UK in 1996, falsely claiming that he was from Somalia in order to gain asylum.

As a teenager, he became best friends with Ramzi Mohammed and for a while both men enjoyed a normal western lifestyle of parties, clubs and girlfriends.

He survived on benefits and was a regular at Stockwell Green mosque. But increasingly Osman was drawn to a more radical message, collecting videos of hostages being killed, including footage of the American journalist Daniel Pearl being beheaded and the speeches of Osama bin Laden, the court heard.

Osman became an increasingly devout follower of Hamza, and a year before the July 21 attacks revealed his extremist streak when he and others from Finsbury Park attempted to take over Stockwell mosque. Police were called by the mosque trustees but there was no attempt to investigate Osman.

Ramzi Mohammed, who was born in Somalia in August 1981, fled his homeland with his younger brother for the UK in 1998, at the age of 17. The brothers were taken in by social services in Slough, Berkshire, and supported by a Notting Hill-based charity, the Rugby Portobello Trust. Living in Hayes, near Slough, he was a typical teenager who enjoyed football, going out to clubs and dating girls.

He met his now wife, Azeb, when he was 19 and moved in with her. Mohammed had two children with Azeb, a Swedish Christian, and worked as a barman in Waterloo station. But by the time Azeb was giving birth to their second child in 2003, he had fallen under the spell of his friend Osman, and the preacher Hamza, the court heard.

Mohammed was spotted by police surveillance officers at the cleric's street sermons outside Finsbury Park mosque on January 9, January 23 and August 6 2004, where he was seen as part of the official entourage, packing away prayer blankets and talking to other leading figures.

As he became increasingly radicalised, Mohammed threw out his hip-hop CDs, explaining later that they contained "effing this and effing that" and encouraged adultery. He ordered Azeb to convert to Islam and wear a veil and took away his son's computer games. "He went from a sweet man to a man who was totally ruled by his religion," Azeb said later.

Mohammed gave up his job at the Reef Bar in Waterloo because as a strict Muslim he did not want to be near alcohol. He moved out of the flat he shared with Azeb and told her "I can only love Allah."

While earning £300 a week as a travelling salesman, he took a housing association flat on the Peabody estate at Dalgarno Gardens, north Kensington. Three months before the July 21 attacks, Mohammed was given indefinite leave to remain in Britain.

On Friday evenings the group, Omar, Osman, Mohammed and Ibrahim, would often meet for religious discussion at the home of the owner of an Islamic bookshop in east London who was linked to a network of training camps across the UK. Under Ibrahim's instruction they were all encouraged to attend a training camp themselves.

Ibrahim, who had spent two months in 2003 training for jihad at camps in Sudan, organised a trip to the Lake District for all five on May Bank Holiday 2004 at Baysbrown Brown Farm near Langdale Pike. The baffled farmer, who watched the group of 23 men set up camp before running around the fields carrying hefty packs, and holding organised prayer meetings, told police he nicknamed the group his "little Taliban".

Despite his convictions as a youth, Ibrahim was given a British passport in September 2004. A month later he was arrested outside Debenhams in Oxford Street after a scuffle with a policeman while spreading his extremist message. Charged with a public order offence, he was bailed to appear in court in December.

But when he should have been before the magistrates, Ibrahim was on his way to Pakistan, to learn more about jihad and bomb-making at a training camp on the border of Afghanistan and Pakistan.

Returning to London on March 8 2005, he effectively moved in with Omar in Curtis House, the one-bedroom flat which was to become the July 21 bomb factory.

On April 27 they purchased the first of 443 litres of hydrogen peroxide, and began cooking it up on the stove to reduce the concentration. Over the next six weeks they bought more than 200 bottles of hydrogen peroxide, and the ingredients to make the bombs, chapati flour, nail varnish remover, sulphuric acid, lightbulbs and snap connector batteries.

As the date for their suicide mission approached, the men tidied up their lives. Mohammed wrote a suicide note to his two small children, which urged them "to be good Muslims, obey your mother", Ibrahim composed a "mission statement" in Arabic, which concluded with the aim of "martyrdom in the path of God."

For Omar there was one thing he wanted to do before ending his life. After choosing a 17-year-old virgin as his bride, he approached Imam Bukhari again on Sunday July 17. This time he begged him for help, asking the imam to carry out a marriage ceremony that day.

Imam Bukhari agreed and Omar was married to his bride in her absence. He spent a night and a morning with her as a married man before joining his friends for a suicide bomb attack which would have left her a widow after four days as a bride.