Updated

A judge sentenced five men to life in prison Monday for plotting to attack targets in London, including a popular nightclub, power plants and shopping mall, with bombs made from a half-ton stockpile of fertilizer.

The trial for the first time exposed connections between the defendants and the deadly 2005 Al Qaeda-linked attack on the city's transit system.

Details kept secret to ensure a fair trial showed that counterterrorism agents tracking the five men had also stumbled onto the transit plotters. And despite disturbing signs that the transit plot was in the works, the agents failed to piece them together in time to prevent the July 7, 2005 bombings that killed 52 people, testimony and official briefings during the trial showed.

The revelations are at odds with statements by Tony Blair's government after the 2005 attack. Senior ministers, who a month earlier had lowered the country's alert status, said the 2005 attack was unexpected and the perpetrators unknown.

Omar Khyam was found guilty of conspiracy to cause explosions made from a chemical fertilizer that could endanger life. Also found guilty were Anthony Garcia, Jawad Akbar, Waheed Mahmood and Alahuddin Amin.

"All of you may never be released. It's not a foregone conclusion," Judge Michael Astill told them.

Two others, Nabeel Hussain and Shujah Mahmood, were cleared of conspiracy to cause explosions. All were arrested on March 30, 2004.

The jury that convicted the five men deliberated for nearly a month after nearly a year of testimony in Britain's longest terror trial. The men, all British citizens, were accused of plotting a series of attacks using more than 1,300 pounds of fertilizer they had placed in a storage unit.

Court-imposed restrictions prohibited reporters from revealing links between the men and the four 2005 suicide transit bombers until the case ended.

Counterterrorism officials acknowledged that intelligence that could have raised alarms before the July 7 transit attacks was never thoroughly investigated, explaining they were overwhelmed by seemingly more urgent threats.

A government security official gave one-on-one briefings with reporters toward the end of the trial, detailing the path that security agents had followed.

As agents monitoring the fertilizer plot listened in on a bug, they heard one of the July 7 bombers, Mohammed Siddique Khan, warn that he planned to kill non-Muslims, the security official said during the briefing, demanding anonymity to discuss sensitive details of the cases.

A tracking device was placed in Khan's car a year before the 2005 suicide bombings and details of his phone calls and meetings with radicals were reported to Britain's domestic spy agency, MI5, on at least four occasions, he said.

Khan also took militia training in Pakistan with at least some of the fertilizer plotters, a witness in the case and officials said.

But, lacking resources, MI5 never pieced together the shreds of intelligence, the official acknowledged.

"There needs to be that killer fact and it just wasn't there," he said, noting that Khan had used several aliases.

Mohammed Junaid Babar, an American FBI Al Qaeda informant, had reported that a Briton using an alias — later identified as Khan — attended a Pakistan militia camp with Al Qaeda linked radicals from Britain and the United States in 2003.

With accomplice Shehzad Tanweer, Khan visited Pakistan again in 2004.

A surveillance team recorded Khan and Tanweer during a 2004 operation to monitor the fertilizer plot — bugging 100 phone lines, a vehicle and two houses. Agents also took pictures of Khan in the company of suspected terrorists.

As agents eavesdropped, Khan — who called himself Milly — warned he would join the "Arab mujahedeen to fight abroad." But his threat was not uncommon or enough to prompt his arrest, the security official said.

In 2004, Babar told U.S. officials that Khan — whom he recognized from a blurred surveillance photograph — had sought meetings with Al Qaeda leaders. But a tip to London authorities was too vague to prompt action, the official said.

Fellow transit bomber Germaine Lindsay's phone number was later discovered among records in a separate plot officials still won't discuss, he said. Only bomber Hasib Hussain was totally unknown.

"The government said there was no way of preventing what happened," said Graham Foulkes, whose son David, 22, was killed by Khan's bomb. "That was a lie."

When the fertilizer gang were arrested in March 2004, police and MI5 uncovered 15 "essential" targets amid their associates — those thought to be preparing imminent attacks on Britain.

Another 40 — including Khan and Tanweer — were ranked "desirable," to be trailed when resources allowed.

Intelligence on Khan and his cell was pieced together only months after the attack, the official said — when their identities and aliases were established. Charges against three alleged accomplices were leveled last month.

Links between plots appear to strengthen claims the July 7 attacks were directed by Al Qaeda, a senior police official conceded, demanding anonymity to discuss the case.

Officials say since July 2005, six other planned terrorist strikes have been halted — but that brings no comfort for Foulkes.

"The fact is," he said. "A known terrorist was allowed to kill my son and 51 others."

Click here for FOXNews.com's Europe center.