Three years ago, when Dzhokhar Tsarnaev was assigned by his high school English teacher to write an essay on something he felt passionate about, he chose the troubled land of his ancestors: Chechnya. He wrote to Brian Glyn Williams, a professor at the University of Massachusetts at Dartmouth.
"He wanted to know more about his Chechen roots," recalled Mr. Williams, a specialist in the history of Chechnya, a predominantly Muslim republic in southern Russia's Caucasus Mountains. "He wanted to know more about Russia's genocidal war on the Chechen people."
Mr. Tsarnaev was born in Dagestan and had never lived in neighboring Chechnya, relatives said, but it fascinated him. The professor sent him material covering Stalin's 1944 deportation of the Chechens to Central Asia, in which an estimated 30 percent of them died, and the two brutal wars that Russia waged against Chechen separatists in the 1990s, which killed about 200,000 of the population of one million.
As law enforcement and counterterrorism officials try to understand why Mr. Tsarnaev, 19, and his brother, Tamerlan, 26, would attack the Boston Marathon, they will have to consider a cryptic mix of national identity, ideology, religion and personality.
Even President Obama, when he addressed the nation on Friday night after Dzhokhar Tsarnaev was captured, seemed to be searching for answers. "Why did young men who grew up and studied here, as part of our communities and our country, resort to such violence?" he said.
It remains to be seen whether personal grievance or some type of ideology was behind the attack, in which investigators say the Tsarnaevs packed black powder into pressure cookers to kill and maim people.
Both brothers were open about their devotion to Islam, and Tamerlan's Web postings suggested an attraction to radicalism, but neither appears to have publicly embraced the ideology of violent jihad. The construction of the bombs in Boston resembled instructions in Inspire, the online magazine of the Al Qaeda branch in Yemen, but the design is available elsewhere online.
Their relatives have expressed anguished bafflement, and it is conceivable that the motive for the attack will remain as inscrutable as those of some mass shootings in recent years.
Still, as investigators try to understand the brothers' thinking, search for ties to militant groups and draw lessons for preventing attacks, they will be thinking of some notable cases in which longtime American residents with no history of violence turned to terrorism: the plot to blow up the New York subway in 2009, the Fort Hood shootings the same year and the failed Times Square bombing of 2010, among others.
"I think there's often a sense of divided loyalties in these cases where Americans turn to violent jihad - are you American first or are you Muslim first? And also of proving yourself as a man of action," said Brian Fishman, who studies terrorism at the New America Foundation in Washington.
Mr. Fishman cautioned that it was too early to draw any firm conclusions about the Tsarnaev brothers, but said there were intriguing echoes of other cases in which young men caught between life in America and loyalty to fellow Muslims in a distant homeland turned to violence, partly as a way of settling the puzzle of their identity.
Akbar Ahmed, the chairman of Islamic studies at American University in Washington, described such men: "They are American, but not quite American." His new book, "The Thistle and the Drone: How America's War on Terrorism Became a War on Tribal Islam," examines how tribal codes of hospitality, courage and revenge have shaped the reaction to American counterterrorism strikes.
"They don't really know the old country," Professor Ahmed said of young immigrants attracted to jihad, "but they don't fit in to the new country."
Add feelings of guilt that they are enjoying a comfortable life in America while their putative brothers and sisters suffer in a distant land and an element of personal estrangement - say, Tamerlan Tsarnaev's statement in an interview long before the attack that after five years in the United States, "I don't have a single American friend" - and it is a combustible mix.
"They are furious," Mr. Ahmed said. "They're out to cause pain."
After about a decade in the United States, the Tsarnaev brothers had both enrolled in college - the elder brother at Bunker Hill Community College, though he had dropped out; the younger at the University of Massachusetts at Dartmouth. Tamerlan was a Golden Gloves boxer and was married with a child; Dzhokhar had been a popular student at a Cambridge school and earned a scholarship for college.
On the face of it, they were doing reasonably well. But the same might have been said, at least at certain stages in their lives, of those behind other recent attacks.
Faisal Shahzad, who staged the failed Times Square bombing at age 30, had graduated from the University of Bridgeport in Connecticut, earned an M.B.A. and worked as a financial analyst. He married an American-born woman of Pakistani ancestry, and they had two children. But as he became steadily more focused on radical religion, he traveled to Pakistan and sought training as a terrorist.
Just six months earlier, in November 2009, Maj. Nidal Malik Hasan, then 39, was accused of opening fire on a crowd of soldiers and civilians at Fort Hood, Tex., killing 13 people. Born in Virginia to Palestinian parents, he had graduated from medical school and become an Army psychiatrist.
But he began to ponder what he felt was a conflict between his duty as an American soldier and his allegiance to Islam. Months before the shootings, investigators say, he consulted Anwar al-Awlaki, the radical Yemeni-American cleric who was later killed in an American drone strike, about whether killing his fellow soldiers to prevent them from fighting Muslims in Afghanistan would be justified.
Even Najibullah Zazi, the Afghan-American who plotted to attack the New York subway with backpacks loaded with explosives, spent five years as a popular coffee vendor in Manhattan's financial district, with a "God Bless America" sign on his cart. He was 24 at the time of his arrest.
In the history of Islamic radicalism, there are far more prominent figures who spent time in the United States.
The Egyptian Sayyid Qutb, who would become the most influential philosopher of jihad against the West, visited on an educational exchange program from 1948 to 1950, developing a deep-seated revulsion for what he saw as American materialism and immorality.
In the 1980s, Khalid Shaikh Mohammed, who went on to plan the Sept. 11 attacks, spent four years studying in North Carolina, earning an engineering degree. His American sojourn did not stop him from devoting the next two decades to plotting against Western and American targets.
If the grim Chechen history that Mr. Williams, the University of Massachusetts professor, shared with Dzhokhar Tsarnaev turns out to be part of the motivation behind the attack, one might have expected the anger to have been directed at Russians, not Americans.
But in the mid-1990s, Mr. Williams said, the Chechen separatist movement split between those who focused locally on the struggle for independence and others who saw their fight as part of a global jihad.
In the propaganda pioneered by Al Qaeda, terrorism is merely self-defense against a perceived American war on Islam. There has been no more stark statement of this belief than the courtroom declarations of Mr. Shahzad as he pleaded guilty and was sentenced to life without parole for the failed bombing in Times Square.
Calling himself "a Muslim soldier," Mr. Shahzad denounced the wars in Afghanistan and Iraq and drone strikes in Pakistan and Yemen. The drones, he said, "kill women, children, they kill everybody."
"It's a war, and in war, they kill people," he added. "They're killing all Muslims."
NEW YORK TIMES