Omar Khyam has been giving evidence in his defence in the fertiliser bomb plot trial at the Old Bailey.
| Omar Khyam says he grew up in a secular household|
Mr Khyam, 24, told the court he was brought up living with his mother and brothers in a secular household in Crawley, West Sussex.
His grandfather had served in the British Army, moving to the UK in the 1970s.
Mr Khyam was captain of the cricket team at a largely white school at which he performed well in his GCSEs.
His household, he said, was one in which little attention was paid to religion.
But, while studying as a teenager in Surrey, he developed an interest in religion and attended meetings of radical group al-Muhajiroun.
He told his Old Bailey trial that, in 1998, he had become interested in "the freedom of Muslim lands from occupation".
"I still believe in that cause," he added.
He started to learn about the trouble between India and Pakistan and, on a 1999 visit to the family homeland of Pakistan, he spoke to members of groups active in Kashmir.
Mr Khyam said that, a few months later, at the age of 17, he convinced his mother he was moving to France to continue his studies and left the family home.
He even persuaded a friend to post a letter to her from France to keep up the pretence.
| Omar Khyam was a keen sportsman in his youth|
But in reality, he had run away to the hills of Pakistan to join a militant training camp.
He told the Old Bailey that, while at the camp, he learnt "everything I needed for guerrilla warfare in Kashmir".
"AK47s, pistols, RPGs, sniper rifles, climbing and crawling techniques, reconnaissance and light machine guns."
Mr Khyam said that in March 2000, after three months at the camp, members of his family - some of whom were in Pakistani military intelligence - managed to trace him.
After receiving a radio message to travel back down from the mountains he was reunited with his grandfather.
"He was pleased but just wanted to tell me where I had gone," Mr Khyam said.
"They were worried about me being killed."
After his return to Crawley, he moved briefly to Belgium to help his father - who is divorced from his mother - to run his clothes shop business.
He then returned to East Surrey College before enrolling in a foundation course in 2001 at the Metropolitan University in north London.
Before his course began, he once again visited Pakistan.
While over there, he also crossed the border to Afghanistan and travelled across the border to Afghanistan to find out how the country worked under the Taleban.
"They were amazing people," he said.
"They loved Allah very much. This is how an Islamic state should be."
Mr Khyam and six other British men deny plotting with a Canadian - between 1 January 2001 and 31 March 2004 - to set off a series of bombs