A French terror suspect who said he converted to Islam when he lived in Brighton told a Paris court he trained to use Kalashnikov rifles and mortars at an Afghan camp.
But David Courtailler denied knowing the prime suspect in the Madrid train bombings.
He is on trial in Paris along with two other suspected Islamic radicals accused of training in Afghanistan with the goal of committing attacks on their return.
The prosecution alleges Jamal Zougam, a Moroccan arrested in connection with the March 11 Madrid train bombings which killed 191 people, met Courtailler at a mosque in Spain in 1998. But Courtailler denied knowing Zougam.
Courtailler described how he converted to Islam in 1997 in Brighton and flew to Pakistan three days later with £1,000 in his pocket and a phone number.
Courtailler, who described his past struggle with drugs and alcohol, said: "This rapid chain of events is difficult to explain. I had problems, I was looking for a religion. I went into a mosque. I can't explain why."
From Pakistan, Courtailler said he headed to a training camp in Khost, Afghanistan, where he learned to use weapons.
At the time, Courtailler said, he had heard of Osama bin Laden but did not know who the al Qaida leader was.
Courtailler returned to Britain in 1998 and allegedly met Zougam during a trip to Spain that year.
Before Zougam's arrest in Spain this month, the Moroccan had already raised suspicions and was questioned by French justice officials in 2001. Court documents say Zougam, under questioning, pointed Courtailler out in photographs and said he knew the Frenchman.
Courtailler, Ahmed Laidouni, 35, also French, and Algerian Mohamed Baadache, 34, are on trial for "criminal association in relation to a terrorist enterprise", a broad charge with a maximum ten-year prison sentence.
Courtailler was arrested in France in March 1999.
He is the brother of Jerome Courtailler, acquitted in 2002 in a trial in the Netherlands of plotting an attack on the US Embassy in Paris.
The trial is expected to continue for some weeks.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules hereComments are closed on this article