Peter Bergen is CNN's national security analyst, a vice president at New America and a professor of practice at Arizona State University. He is the author of the forthcoming book "United States of Jihad: Investigating America's Homegrown Terrorists."

Before she died in a hail of police bullets, the female attacker, Tashfeen Malik , posted on Facebook, pledging allegiance to ISIS leader Abu Bakr al-Baghdadi, employing an account that did not use her real name, three U.S. officials familiar with the investigation told CNN on Friday.

This news helps move the investigation away from the notion that the San Bernardino attack was, perhaps, an act of workplace violence and makes it an act of terror. Indeed, on Friday the FBI announced that it is investigating it as an "act of terrorism."

It never made much sense that the attack could be commonplace workplace violence, as some had initially speculated. After all, Malik and her husband Syed Farook had set up a bomb factory at their house where they had constructed a dozen pipe bombs; they had acquired two assault rifles and two handguns as well as 4,500 rounds of ammunition, and they wore "tactical" military-style clothing and black masks during their assault.

The couple went to great lengths to hide their tracks; destroying the hard drive in their computer; smashing their cell phones and maintaining almost no presence on social media.

They were able to maintain perfect operational security because as a married couple they had no need to send each other emails or make phone calls to discuss their plot. They were so-called "clean skins" who were not known to law enforcement.

Farook and Malik, in short, appeared to be planning some kind of deadly campaign. Now, we know it was on behalf of ISIS.

(Also arguing against the notion that this was an ordinary mass shooting of the type that is all-too-frequent in the States is the fact that they almost invariably involve only one person. According to the FBI, of the 160 "active shooter" incidents in the United States between 2000 and 2013, only two involved more than one shooter. )

American Dream?

Farook and Malik to all intents and purposes were living the American Dream. Farook, 28, was earning more than $70,000 a year in a solidly middle-class job and the couple lived in a two-story townhouse in a neighborhood with neatly trimmed lawns. They had just celebrated the birth of their first child in May.

These facts may seem surprising. After all, many people conceive of terrorists as young males without children who are on the margins of society and may have a criminal background. While this profile is largely true of the terrorists who attacked in Paris last month, the profile of American jihadist militants is quite different.

New America has assembled a database of more than 300 militants charged with some kind of terrorism crime in the States since 9/11. Who are they? Their average age is 29; more than a third are married, and more than a third have children. They are, on average, as well-educated as the typical American.

Given these facts: What puts these American militants on the path to radicalization and how might what we know about Farooq and his wife fit into this pathway?

An influential study of the radicalization process was published by the New York Police Department in 2007. The report, "Radicalization in the West: The Homegrown Threat," laid out a taxonomy of jihadist terrorists in the West: "unremarkable" male Muslims between the ages of 15 and 35, generally well-educated and middle class, many of whom grew up as nonobservant Muslims or were converts to Islam. Many of the plotters had no links to formal terrorist organizations.

Some kind of personal crisis (the loss of a job, the experience of racism, moral outrage caused by the way Muslims were being treated in international conflicts, or the death of a close family member) provided a "cognitive opening" for a turn to Salafism -- a fundamentalist form of Sunni Islam -- beliefs, demonstrated by wearing traditional Islamic clothing and growing beards.

This was not in itself alarming; these were simply fundamentalist practices. In the next stage of their radicalization, however, as their views became more politicized, the militants separated themselves from society, spending more and more time only with similar, radicalized individuals.

The report describes the final stage before people turn to terrorism as "jihadization": the point at which a militant decides to perform jihad. This often takes the form of travel abroad for training.

Syed Rizwan Farook and Tashfeen Malik.

After trips he made to Saudi Arabia in 2013 and 2014, Farook seemed to become more devout, according to co-workers who noted he had grown a long beard. In Saudi Arabia, he also married Malik, who presumably shared his fundamentalist religious views to the point that she was willing to effectively commit suicide alongside him. Malik, originally of Pakistani origin, arrived in the United States on a visa as Farook's fiancee. She later became a lawful permanent resident.

Could the trip to Saudi Arabia have been Farook's "jihadization?" We don't know at this point, but his trips there seemed to have turned him in a more fundamentalist direction and it was also where he met and married his future partner-in-crime.

Who Are ISIS' American followers?

Malik's pledge of support to ISIS in America, is not alone. The FBI investigated supporters of ISIS in all 50 states during 2015, and by early December more than 80 extremists had been charged with some kind of Syria-related crime, ranging from planning travel to Syria to plotting an attack in the United States, almost all of them inspired by ISIS. It was the peak year for such cases since 2001.

Those drawn to ISIS have also skewed younger and more female than previous generations of American militants. One in five were teenagers -- including six teenage girls, the youngest of whom was 15.

On average, according to New America data, the individuals involved in Syrian militancy were aged 25. And while the majority of ISIS supporters in the States were men, more than one in six of them were women -- an unprecedented development.

Women were present rarely, if at all, among jihadists in previous holy wars in Afghanistan against the Soviets, in Bosnia against the Serbs, and in the initial insurgency in Iraq against the U.S.-led occupation.

With Malik and Farook's joint attack in San Bernardino the sobering conclusion is that female jihadists can be as deadly as their male counterparts, including in the United States.

What can be done about the lone wolves inspired by ISIS as seems to be the case with the San Bernardino attackers? The FBI says it has mounted some 900 investigations into militants in the States and the Bureau has done a pretty good job of monitoring and arresting ISIS recruits.

Where those recruits have practiced careful operational security it is much harder for the FBI to act, and clearly the FBI didn't see Malik and Farooq coming. The hard fact is that there may be other such militants out there and there isn't much the feds can do to prevent them acting if they are "clean skins."

One thing that surely can be done is to ensure that the more than 47,000 people who are on the U.S. "no fly" list of suspected terrorists are not allowed to buy weapons in the States. Astonishingly, over the past decade or so more than 2,000 people known or suspected to be terrorists have bought guns and assault rifles.

Sen. Dianne Feinstein (D-Calif.) and Rep. Peter King (R-New York) have both introduced bills to end this practice, but they have been stymied on the Hill as recently as earlier this week.

Such measures wouldn't have stopped Malik and Farooq, but it may stop others. It's a good indicator of how broken Congress is that this commonsense measure can't get passed.