Philadelphia: The trip from a strict Pakistani boarding school to a bohemian bar in Philadelphia has defined David Headley’s life, according to those who know the middle-age man at the centre of a global terrorism investigation.

Different worlds: David Headley was raised by his father in Pakistan as a devout Muslim. He returned to the US at the age of 17 to live with his American mother. Headley as a child, with his mother Serrill Headley and younger sister in an undated photo. NYT

Today, Headley is an Islamic fundamentalist who once liked to get high. He has a traditional Pakistani wife, who lives with their children in Chicago, but also an American girlfriend—a make-up artist in New York—according to a relative and friends. Depending on the setting, he alternates between the name he adopted in the US, David Headley, and the Urdu one he was given at birth, Daood Gilani. Even his eyes—one brown, the other green—hint at roots in two places.

Headley, an American citizen, is accused of being the lead operative in a loose-knit group of militants plotting revenge against a Danish newspaper that published cartoons of the Prophet Muhammad. The indictment against him portrays a man who moved easily between different worlds. The profile that has emerged of him since his arrest, however, suggests that Headley felt pulled between two cultures and ultimately gravitated toward an extremist Islamic one.

“Some of us are saying that ‘Terrorism’ is the weapon of the cowardly," Headley wrote in an email message to his high school classmates last February. “I will say that you may call it barbaric or immoral or cruel, but never cowardly."

He added, “Courage is, by and large, exclusive to the Muslim nation."

Headley’s email messages, including many that defended beheadings and suicide bombings as heroic, are among the evidence in the government’s case against him and his accused co-conspirator, Tahawwur Hussain Rana, who was born in Pakistan, is a citizen of Canada and runs businesses in Chicago.

The men, who became close friends in a military academy outside Islamabad, were arrested last month in Chicago. They are charged with plotting an attack they labelled the Mickey Mouse Project against Jyllands-Posten, the Danish newspaper whose cartoons provoked outrage across the Muslim world.

Since then, the investigation has widened beyond Chicago and Copenhagen. The authorities have learned more, with cooperation from Headley, about the two men’s network of contacts with known terrorist groups, including Al Qaeda and Lashkar-e-Taiba, a Pakistani militant group, as well as officials in the Pakistani government and military. US and Indian investigators are also looking into whether the two Chicago men, who travelled to Mumbai before the deadly assault there last November, may have been involved in the plot.

Headley, 49, and Rana, 48, stand out from the young, poor extremists from fundamentalist Islamic schools who strike targets in or close to their homelands. Instead, their privileged backgrounds, extensive travel and bouts of culture shock make them more like Khalid Shaikh Mohammed, the self-proclaimed architect of the 11 September 2001 attacks, who attended college in the US, and Mohammed Atta, one of the lead hijackers.

Rana’s father is a former principal of a high school outside Lahore. One of his brothers is a Pakistani military psychiatrist who has written several books, and another is a journalist at a Canadian political newspaper, The Hill Times.

Trained as a physician, Rana immigrated to Canada in 1997 and became a citizen a few years later. Then he moved his wife and three children to Chicago, where he opened a travel agency that also provided immigration services on Devon Avenue, which cuts through the heart of the city’s Pakistani community. In 2002, he started a halal slaughterhouse that butchers goats, sheep and cows according to Islamic religious laws.

The Khyber Pass in Philadelphia. The bar was once owned by Headley’s mother. In 1985, his mother put him in charge of the bar, but he proved to be such a poor manager that the family lost it.Jessica Kourkounis/NYT

“He seemed very committed to his Islamic religion," said William Rodosky, who once managed Rana’s slaughterhouse, in Kinsman, Illinois, about 100km south-west of Chicago. “He said he wanted the business so he could provide meat to his people and make a little money."

Rodosky echoed the views of several others who knew and did business with Rana when he said he was “shocked about the terrorism charges".

“As far as I knew, he was very nice man and a very good businessman," Rodosky said.

But Headley did not draw the same expressions of shock. Those who knew him paint a more troubled image.

“Most people have contradictions in their lives, but they learn to reconcile them," said William Headley, an uncle who owns a day care centre in Nottingham, Pennsylvania. “But Daood could never do that. The left side does not speak to the right side. And that’s the problem."

Daood Sayed Gilani was born in Washington, where his parents worked at the Pakistani embassy. Friends of the family said his father, Sayed Salim Gilani, a dashing diplomat and an avid musicologist and poet, charmed his way into the heart of Serrill Headley, who had left Philadelphia’s Main Line to work as a secretary at the embassy.

In 1960, the couple and their infant son, Daood, left the US bound for England aboard the ship America, and from there went on to Lahore. But the marriage quickly soured, friends said, as Salim Gilani immersed himself in the traditions of his homeland and his bride refused to submit to them.

After Serrill Headley left Gilani and her son and a daughter, Syedah, in Pakistan, friends say, the details of her life become lost in a jumble of fact and fiction. Serrill Headley, a red-haired, green-eyed woman, told friends she married an “Afghan prince" but then had to flee Kabul after he was murdered.

She arrived back in Philadelphia, friends said, in the early 1970s, taking different office jobs and dating wealthy suitors until one of them lent her money to buy an old bar. She turned it into the Khyber Pass, decorated with billowing Afghan wedding tents and stocked with exotic beers.

In 1977, Pakistan’s government was overthrown in a military coup, and Serrill Headley, friends said, feared for her children. She travelled to Pakistan, withdrew her son from the Hasan Abdal Cadet College and brought him to live with her, a move recorded by The Philadelphia Inquirer. (Her daughter, Syedah, stayed behind with her father for several years.)

“He has never been alone with, much less had a date with, a girl, except the servant girls of his household," the article said, referring to the teenage Daood Gilani. “But he has just this day found a cricket team to join. And he has just this day, after watching American TV, said to his mother in his soft Urdu-English that she is to him like the Bionic Woman."

The second-floor apartment where Headley’s family lives in Chicago. Peter Wynn Thompson/NYT

“Those were the days when girls, weed, and whatever, were readily available," Jay Wilson, who worked at the Khyber Pass, wrote in an email message from England. “Daood was not immune to the pleasures of American adolescence."

Later, said Lorenzo Lacovara, another former worker at the bar, Daood Gilani began expressing anger at all non-Muslims.

“He would clearly state he had contempt for infidels," Lacovara said in a telephone interview from New Mexico. “He kept talking about the return of the 14th century, saying Islam was going to take over the world."

Serrill Headley tried to help her son straighten out his life. In 1985, she put him in charge of the Khyber Pass, but he proved to be such a poor manager that they lost the bar a couple of years later, friends of the family said.

Serrill Headley embarked on her third marriage, and her son set off for New York, where he opened two video rental stores in Manhattan. It is unclear where he got the money to start the ventures. But court files suggest that the source may not have been entirely legal.

In 1998, Gilani, then 38, was convicted of conspiring to smuggle heroin into the country from Pakistan. Court records show that after his arrest, he provided so much information about his own involvement with drug trafficking, which stretched back more than a decade, and about his Pakistani suppliers, that he was sentenced to less than two years in jail and later went to Pakistan to conduct undercover surveillance operations for the Drug Enforcement Administration.

In 2006, he changed his name to David Headley, apparently to make border crossings between the US and other countries easier, court documents say. About that time, his uncle said, he moved his family to Chicago because it had a large Muslim community and he wanted to send his four children to religious schools.

There, the family lived in a small second-floor apartment. Headley claimed to work for Rana’s immigration agency. The two men attended the Jame Masjid mosque on Fridays, then stopped at the nearby Zam Zam restaurant to eat and talk politics. Cricket, neighbours said, was their passion.

But Headley never seemed to fully fit in. Masood Qadir, who sometimes watched cricket with him, said he was “different" and kept mostly to himself.

Email messages show, however, that Headley stayed in regular contact with classmates from the military high school he attended in Pakistan, often engaging in impassioned debates about politics and Islam.

Earlier this year, Headley complained about “Nato criminal vermin dropping 22,000 pound bombs on unsuspecting, unarmed Afghan villagers" or “napalming South-East Asian farmers". Writing about Pakistan’s chief enemy, he said, “We will retaliate against India."

And in an email message defending the beheading of a Polish engineer by the Taliban in Pakistan, he wrote, “The best way for a man to die is with the sword."

Puk Damsgard in Islamabad, Pakistan; Emma Graves Fitzsimmons in Chicago; Nate Schweber and John Eligon in New York; Ian Austen in Ottawa; and Barclay Walsh in Washington contributed to this story.