In 2008, Marc Sageman, a forensic psychiatrist who once worked for the CIA, made a bold prediction: Al Qaeda’s glory days were over. The greatest threat now was not a plot hatched and paid for by a mastermind in Afghanistan, but rather the ideas of countless “homegrown wannabes” in Europe and the United States.

“The threat is no longer ‘foreign fanatics,’ but people who grew up in the West,” he wrote in his book “Leaderless Jihad.”

His prediction sparked controversy back then. But time has proven his point: The first successful explosion in the name of Islamic extremism in America since the attacks of 9/11 appears to have been executed — not by an Al Qaeda sleeper cell — but by former students at Cambridge Rindge & Latin.

We still don’t know how much support the Boston Marathon bombers had from overseas. Chechnya’s main militant group, Caucasus Emirate, denies any link to the brothers. Instead, the Marathon bombing appears to be the work of what Sageman describes as the “Third Wave” of terrorism. The Third Wave isn’t about Al Qaeda grooming recruits and dispatching them to do its bidding. It’s about young men who surf the Internet and decide on their own to write their names in history with a bomb. They get inspiration from Al Qaeda. In some cases, they even get training. But they are the ones that seek it out.

“Like Harvard, Al Qaeda did not have to recruit,” Sageman wrote. Young men came in droves, begging for an affiliation.

Sageman says the average recruit at Al Qaeda Central in the 1990s was nearly 30 years old. The average Third Waver is in his early 20s. The majority of Al Qaeda Central grew up in religious homes. About 75 percent of the Third Wavers had fairly secular childhoods.

So why the turn to radicalism?

For some, it was out of a warped romanticism for a homeland they barely knew; an act of rebellion against hardworking immigrant parents who brought them to the West for “a better life.” Others were US-born converts to Islam who found in terrorism a sense of camaraderie and purpose that had eluded them all their lives. A few became terrorists after years of gang-banging and drug dealing. It was an ideology that transformed their violent tendencies into something heroic. It made them feel they were on the side of the angels.

The 2004 Madrid bombing was planned by a group of friends who sold hashish and ecstasy, but grew increasingly obsessed with the Iraq war.

The 2005 London subway bombing was planned by a group of friends who worked out at a gym together, whose Pakistani parents were described in the newspaper as the “picture of assimilation.”

Third Wavers “are basically trying to find out who they are,” Sageman said. “Their identities are very different from their parents. What they imagine their parents’ country to be never really was.”

That rings true of the Tsarnaev brothers, whose parents immigrated to the Boston area in 2002. The older brother, who dropped out of community college and was once accused of assaulting a girlfriend, might have been casting about for something to believe in. Searching the Internet for information about his troubled homeland in Chechnya would have yielded a trove of jihadi websites full of rhetoric about America’s “war against Islam.’’ As he became more radical, he may have dragged his more outgoing and successful younger brother down with him.

Two weeks before members of the extended Tsarnaev family got the shocking call about what had happened to these brothers, another family in Ontario got a similar call.

Ali Medlej — whose father came from Lebanon — seemed like a regular kid in high school. He clowned around in class and loved rap lyrics. Unemployed after graduation, he got in trouble for shoplifting and trashing his apartment. Then he and two friends from high school got drawn toward a radical form of Islam. Eventually, they disappeared.

Earlier this month, Medlej’s parents learned his fate: He was among a group of terrorist gunmen who stormed a gas plant in Algeria in January in a bloody hostage-taking. Scores of hostages and all but three of the gunmen died. Their charred remains had just been identified.

So what do we do now? We know how to fight Al Qaeda. But how do we fight terrorism when it springs from the violent fantasies of our own kids?

For some youth, Sageman said, terrorism is a fad, like punk rock music.

“The answer is to wait for another fashion to come along and inspire these kids.”

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.