By Dominic Casciani
BBC News, Kingston Crown Court
Waheed Ali and Mohammed Shakil have been jailed for seven years
Two former friends of the 2005 London suicide bombers have been jailed for plotting to attend a terrorist training camp in Pakistan.
Waheed Ali, 25, and Mohammed Shakil, 32, of Leeds, were both sentenced to seven years in prison.
The two men and a third defendant were acquitted on Tuesday of helping the London bombers to scout for targets.
Mr Justice Gross said there was no doubt the pair had planned to train at a camp for Taleban fighters.
The camp provided fighters for the war against British and other forces in Afghanistan.
The judge told Kingston Crown Court that a signal had to be sent that attending these camps was unacceptable - and that they had betrayed the country that had given their families a home. The men have spent two years on remand and could be released in about 18 months time.
Ali and Shakil were arrested along with a third man in 2007 as part of the massive investigation into the 7 July suicide bombings.
After a retrial, the trio were cleared on Tuesday of helping the bombers at an early stage of their planning.
But in the weeks leading up to their March 2007 arrest, the security services watched Ali and Shakil preparing to attend a militant camp. They bought camping equipment and took steps to conceal their plans.
In court, they accepted they might have been thinking about joining up with a mujihadeen group - something they had both done before - but said the primary aim of their trip was a holiday.
But jailing the men, Mr Justice Gross said that he had no doubt that they had they not been arrested, they would have trained at a militant camp in Baluchistan which was providing fighters for the Taleban's war against the British and coalition forces in Afghanistan.
The judge said there could be no "a la carte" approach to citizenship in the UK where men like Shakil and Ali pick and choose which elements of belonging suited them best.
Citizens could either put up with things they did not like, use the democratic process to lobby for change, or leave for somewhere "more congenial" if they could stand it no longer.
1999: Mohammed Shakil in Kashmir
2001: Mohammed Sidique Khan and Waheed Ali in Kashmir and Afghanistan
2003: Khan and Shakil, Pakistan
2004: Khan, Shehzad Tanweer, Ali in Pakistan; Khan and Tanweer went on to a further unknown location
2007: Ali and Shakil plan to head to Pakistan but are arrested. Convicted in relation to this planned trip
"It's not up to you to take the benefits of living in Beeston in a decent and tolerant society when you choose, and then to consort with those that kill our armed forces where you see fit.
"The plain reality is that by seeking to attend such a camp, you betray the country that has given your families a home. You were not born here, you chose to live here. Your loyalty is sadly lacking."
He said that on current estimates some 1,000 young British Muslim men had attended mujihadeen camps between 1998 and 2003. Some of these men were determined militants and others were naive.
"This was not a one-off naive frolic by a pair of dupes - you knew what you were doing. You knew what you intended to do. Your intention was to attend a real camp and use real guns. This was not play-acting. You were determined players."
Both Ali and Shakil had argued in court that it was their religious duty to defend Muslim lands against invading foreign armies - and that their beliefs and deeds were completely different to al-Qaeda's terrorist ideology.
Neither could be prosecuted for their previous visits to militant camps for legal reasons, but the judge said they had shown a commitment to a radical and dangerous jihadist ideology.