Even by the intrigue-swilled standards of Pakistan's frontier badlands it was a strange case. On a muggy October afternoon last year a battered taxi trundled out of Mohmand, a Taliban-infested corner of the tribal belt, towards the settled area of North-West Frontier province.

In the passenger seat sat a swarthy young man of athletic build wearing a black shalwar kameez, a tight beard and trainers like those favoured by insurgent fighters. At a government checkpoint a suspicious policeman searched him, only to make some startling discoveries.

The man had American dollars in his pocket, a laptop computer in his bag and a cheap Chinese knife tucked into his shoes. He barely spoke a word of Pashto, the local language. And he produced an American passport that identified him as Jude Kenan Mohammad, a 19-year-old student, who claimed to be a tourist.

"He said he had come to visit a friend," the officer, Khurshid Khan, said, sitting on his bed in the dingy checkpoint. "I thought he looked like a Taliban spy."

The case excited a brief stir in Pakistan. Curious reporters turned up at two court hearings, as did officials from the fortress-like US consulate in Peshawar. Pakistani intelligence interrogated him.

Just as quickly, the matter faded away. The court charged Kenan with two minor misdemeanours – lacking the correct paperwork and carrying an illegal weapon – and freed him on bail of £750. The intelligence men said nothing, the world moved on. But last month the case of the enigmatic American "tourist" resurfaced in a much more serious light, as a key element of a terrorism trial in his home city of Raleigh, North Carolina.

On 4 August, the FBI indicted Kenan as the eighth man in a plot by a gang of mostly American Muslims to commit murder, kidnap and mayhem in the name of "violent jihad". If convicted, he faces life in prison.

Prosecutors claim the men were led by Daniel Boyd, a 39-year-old building contractor and convert to Islam who, they say, used his lakeside home to stockpile weapons, spread extremist literature glorifying Osama bin Laden, and foster a cell of homegrown American jihadi terrorists.

In preliminary hearings investigators played recordings of rattling gunfire at a military-style training camp run by Boyd, and a tape in which he declares: "I love jihad. I love to stand there and fight for the sake of Allah."

What has alarmed Americans most is the middle-class ordinariness of the accused. Boyd had a Support Our Troops sticker on his truck; one of his sons was an eagle scout; his friend Ziyad Yaghi was arrested by the pool, wearing only his swimming trunks.

This shows, the FBI says, that "terrorists and their supporters are not confined to the remote regions of some faraway land but can grow and fester right here at home". But friends and family of the eight accused say the prosecution is a huge mistake, misinterpreting everything from politically driven talk of jihad to a shooting outing with legally held weapons. "Pure poppycock," said Boyd's older brother, Robert, of the charges.

Boyd's non-Muslim neighbours say the image of a dangerous fanatic is at odds with the devout, personable man they know. "Everyone's got guns," said neighbour Jeremy Kuhn. "Welcome to North Carolina."

The trial is likely to revolve around one question: were the Boyd gang truly trainee terrorists, or just big-mouth blowhards?

Part of the answer may be found thousands of miles away, in the swirling, violent frontier region of north-western Pakistan, where the eighth man is still at large. Jude Kenan is the product of an unusual union. His father, Taj Muhammad, hails from Dara Adam Khel, a lawless town of gunsmiths south of Peshawar known for its brisk sales of imitation AK-47s and rocket launchers. His mother, Elena, is a white American who converted from Catholicism to Islam. According to Kenan's lawyer, Khan Ghawas Khan, the couple met in New York in the early 1980s when Muhammad was pursuing a masters in law. They had four girls and a boy and lived in Pakistan for several years. But about a decade ago Elena moved back to America, he said, taking her son with her.

In Raleigh, Kenan was a pretty typical teenager – partying, drinking and dating girls. His usual greeting was "yo, what's up, man", say friends. "He was very popular, cool as hell," said one. About 18 months ago something changed.

Kenan, who had always played basketball outside the local mosque, became a more observant Muslim, stopped partying and made plans to see his father in Pakistan. "He would say, 'I've been there, done that, it's time for me to settle down,'" the friend said.

Last October he left for Pakistan. While in Raleigh he shared a cheap two-bedroom apartment with a sister, in Dara Adam Khel he was part of the tribal elite. According to his lawyer the family have extensive business interests across Pakistan – five petrol pumps, property in Karachi, a fuel distribution firm and millions of rupees worth of shares.

But his new home was also a dangerous place. Last year, soldiers and Taliban fighters battled for months for control of Dara Adam Khel, and a major road tunnel near the family house was closed.

On 13 October, the day of his arrest, Kenan told his father he was going into Peshawar to buy movies. That afternoon, he was arrested on the border of Mohmand agency and Charsadda, north of Peshawar. He seemed unperturbed. "He was very calm and friendly, not at all aggressive," recalled officer Khan.

In court, Kenan lunged playfully at a cameraman who filmed him being led away in handcuffs. His father loudly remonstrated with him before the judge. "He said, 'Look at the problems you have created for me!,'" said journalist Kaman Shah. Kenan's lawyer, Ghawas Khan, called the trip a rash adventure of youth: "He only wanted to boast to the people in America that he had seen the place where the Taliban are fighting."

Back in Raleigh, the FBI was taking a more sinister view. Daniel Boyd was coming under scrutiny. Federal agents tapped his phone and recruited an informant to penetrate his circle. Boyd knew they were watching. "The FBI wants to catch me slipping," he told a friend.

The son of a US marine, Boyd converted to Islam at 17. In Raleigh he was a prominent, if intensely devout, Muslim. His wife, Sabrina, wore a burka in public while his sons, Dylan, 22, and Zakariya, 20, stood out for their flowing white robes and scraggy beards. A year earlier Boyd had opened the Blackstone Market, a shop selling halal food that became a meeting place for the Muslim community. There, he liked to tell tales of past glory fighting the Soviet Union, a disputed episode that has become a central part of the FBI case against him.

In 1989, Boyd and his brother Charles moved to Peshawar to participate in the CIA-sponsored "jihad" war against the Soviet occupation of Afghanistan. But they were too late – the Soviets quit Afghanistan six months before they arrived.

Instead the Boyds appear to have joined Hizb-i-Islami, one of the mujahideen factions that was fighting in Afghanistan's growing, post-Soviet civil war. During this time, the FBI claims, Boyd attended three "terrorist training camps" in Sadr, Khalden and Jawr – camps that only a few years earlier had been funded with tens of millions of dollars in covert CIA funding.

The Boyds' Pakistan adventure soured dramatically in 1991. A Peshawar court convicted the brothers of robbing a bank of $3,200, and handed down a shocking sentence: the amputation of their left hands and right feet. "This is not an Islamic court, it is a court of unbelievers," Daniel Boyd yelled as he was led away. But the ruling was overturned on appeal, and the Boyds returned to America.

This colourful history will be explored in Boyd's trial, due to start later this year. But first there are unresolved matters involving his alleged accomplice, Kenan.

The young American is due back in court on 5 September to face minor charges from last year's unlikely trip through the tribal belt. His lawyer, Ghawas Khan, predicts a rapid acquittal. "There is no evidence against him, I am 100% sure."

More pressing questions loom at home. One witness told the FBI that Kenan "attempted to recruit him to travel to Pakistan to engage in violent jihad".

Prosecutors refuse to say whether they will seek his extradition.

"We're trying to actually locate him," said Robin Zier, spokeswoman for the US attorney's office in Raleigh.

Ghawas Khan said he had not even heard of the American charges until the Guardian approached him. Despite repeated requests he could not provide a contact number for his client.

"All I can say is that the authorities here know he is totally innocent," he said. "He's just a baby."