WASHINGTON -- The lone gunman keeps law enforcement officers across the country awake at night.

He's hard to pick out of a crowd. He has no criminal record. Often, he hasn't told anyone about his plans. He's compiled a weapons cache legally. He doesn't show up on any law enforcement radar until after he's acted.

The government has been more successful stopping al-Qaida from pulling off another Sept. 11-type attack than it has in preventing deadly shooting sprees such as the one in the movie theater in Aurora, Colo.

Law enforcement officials say it's nearly impossible to stop someone like James Holmes, the intelligent 24-year-old who, officials believe, killed 12 people and injured dozens of others.

The threat of the lone offender has become such a concern that the FBI in 2009 created a more than 25-member task force to identify common behavioral traits and characteristics. In 2012 alone, there have been 22 mass shootings, according to the Brady Campaign to Prevent Gun Violence.

To stop al-Qaida, the government attacked terrorist hideouts, froze major sources of terrorists' funding and made it more difficult for them to acquire weapons and materials to build bombs.

Holmes does not appear to be part of any terrorist or criminal network; officials say his purchases were legitimate and raised no red flags. "There will be no easy or quick answers and maybe there will never be any answers," Aurora Police Chief Dan Oates told CBS' "Face the Nation," adding that all the evidence gathered so far indicates "he wasn't particularly aided by anyone else."

Until Friday, Holmes did nothing to bring him to the attention of law enforcement.

"There's no way you can prevent it. There's absolutely no way," said Peter Ahearn, a former FBI agent. "It was random. It happened. There was nothing that could have prevented that unless someone saw him loading his car with guns."

The Homeland Security Department runs a nationwide "If You See Something, Say Something" campaign. Ads encouraging people to report suspicious activity are displayed around the country, including in some movie theaters, the department said.

So far, law enforcement has not determined a motive for the attack, and no one has come forward to say they saw Holmes doing something suspicious. People have described him as clean-cut, studious and quiet. A man who had a drink with him just days before his deadly rampage said Holmes had a backpack and geeky glasses.

When Holmes launched his attack he was dressed in black, outfitted in a gas mask, ballistic helmet, vest and leggings, black tactical gloves and protectors on his throat and groin. He was armed with an assault-style rifle, a shotgun and Glock handgun.

Holmes broke no laws when he purchased his weapons, and he passed the required background checks.

Previously enacted legal restrictions on guns might have made it more difficult for Holmes to buy certain weapons and kill so many people, but he still would have been able to purchase a gun.

In 1994, Congress approved a 10-year ban on 19 types of military-style assault weapons. This ban would have prevented Holmes from purchasing one of the four firearms police found on him and in his car – the assault rifle. The ban also would have prevented Holmes from buying new high capacity ammunition magazines so that he could fire off more shots before without having to reload.

But that law expired in 2004, and it's been more than a decade since gun control advocates had a realistic hope of getting the type of legislation they seek, despite predictions that each shocking outburst of violence would lead to action.

There is a law that restricts the purchase of body armor, but that's only if the purchaser is a violent felon. It's enforced through an honor system, as no background checks are required, said Dan Vice, senior attorney for the Brady Center to Prevent Gun Violence.

Holmes also "booby-trapped" his apartment with trip wires and explosive devices set up to kill, police said. He appeared to use three types of explosives – jars filled with accelerants, chemicals that would explode when mixed together and more than 30 "improvised grenades," according to a law enforcement official, who spoke on condition of anonymity, citing the ongoing investigation. It's unclear whether those materials were legally purchased or whether they were of such high quantities that purchasing them could have set off a red flag for an observant store clerk.

Many lone gunmen and lone wolf terrorists are intelligent and have normal cognitive functions, such as the ability to remember things, pay attention and concentrate, said Kathleen Puckett, a former FBI behavioral expert. Puckett did a study in 2001 for the FBI that examined lone offenders, terrorists and shooters. "Basically there was no common denominator outwardly that you could see," she said.

This leaves any hope of stopping someone like Holmes to the average person to say something if he sees something suspicious, said Christopher Voss, a former FBI agent and hostage negotiator. It's on the government to reassure people that they're not being paranoid, or overreacting, when they see something that doesn't seem right, he said.

"That's really the only defense against lone gunmen – for someone to have said something when they wrote off their observations and instincts," Voss said.

In an intelligence bulletin, the FBI and Homeland Security Department reminded law enforcement about indicators of suspicious activity at entertainment venues such as movie theaters. Among those are significant changes to appearances from one visit to the next, missing hands or fingers, strange odors or bright stains on clothes, clothing that's not appropriate for the season, an unusual interest in security procedures and loitering without an explanation.

When people first saw Holmes in the theater, he was a silhouette, taken by some in the audience for a stunt that was part of one of the summer's most highly anticipated films.

But then, authorities said, he threw gas canisters that filled the packed the theater with smoke and opened fire as people screamed and dove for cover.

"This does keep you up at night," Ahearn said. "There's nothing you can do to predict that type of crime."

Also on HuffPost:

Loading Slideshow...
  • Tom Sullivan , holds a photograph of his son, Alex Sullivan, as he pleads with the media to help him find his son, outside Gateway High School on Friday, July 20, 2012 in Aurora, Colo. Alex Sullivan, was celebrating his 27th birthday by attending midnight premiere of the Batman movie Friday night. A gunman wearing a gas mask set off an unknown gas and fired into the crowded movie theater killing 12 people and injuring at least 50 others, authorities said. (Photo credit: AP Photo/Barry Gutierrez)

  • A woman cries outside Gateway High School where witness were brought for questioning after a gunman opened fire at a midnight premiere of The Dark Knight Rises Batman movie Friday, July 20, 2012 in Aurora, Colo. A gunman wearing a gas mask set off an unknown gas and fired into the crowded movie theater killing 12 people and injuring at least 50 others, authorities said. (Photo credit: AP Photo/Barry Gutierrez)

  • Tom Sullivan, center, embraces family members outside Gateway High School where he has been searching frantically for his son Alex Sullivan who celebrated his 27th birthday by going to see "The Dark Knight Rises," movie where a gunman opened fire Friday, July 20, 2012, in Aurora, Colo. (Photo credit: AP Photo/Barry Gutierrez)

  • Eyewitness Chandler Brannon, 25, sits outside Gateway High School where witnesses were brought for questioning after a shooting at a movie theater showing the Batman movie "The Dark Knight Rises," Friday, July 20, 2012 in Aurora. A gunman wearing a gas mask set off an unknown gas and fired into the crowded movie theater killing 12 people and injuring at least 50 others, authorities said. (Photo credit: AP Photo/Barry Gutierrez)

  • A small group prays outside Gateway High School where witness were brought for questioning Friday, July 20, 2012 in Aurora, Colo. A gunman wearing a gas mask set off an unknown gas and fired into the crowded movie theater killing 12 people and injuring at least 50 others, authorities said. (Photo credit: AP Photo/Barry Gutierrez)

  • Family and friends wait outside Gateway High School where witnesses were brought for questioning after a shooting at a movie theater showing the Batman movie "The Dark Knight Rises," Friday, July 20, 2012 in Aurora, Colo. A gunman wearing a gas mask set off an unknown gas and fired into the crowded movie theater killing 12 people and injuring at least 50 others, authorities said. (Photo credit: AP Photo/Barry Gutierrez)

  • Eyewitness Jacob Stevens, 18, hugs his mother Tammi Stevens after being interview by police outside Gateway High School where witnesses were brought for questioning Friday, July 20, 2012 in Aurora, Colo. A gunman wearing a gas mask set off an unknown gas and fired into the crowded movie theater killing 12 people and injuring at least 50 others, authorities said. (Photo credit: AP Photo/Barry Gutierrez)

  • Eyewitness Isaiah Bow hugs his mother Shamecca Davis after being questioned by police outside Gateway High School where witnesses were brought in, Friday, July 20, 2012 in Aurora, Colo. After leaving the theater Bow went back in to find his girlfriend. "I didn't want to leave her in there. But she's ok now," Bow said. A gunman wearing a gas mask set off an unknown gas and fired into the crowded movie theater killing 12 people and injuring at least 50 others, authorities said. (Photo credit: AP Photo/Barry Gutierrez)

  • Emma Goos, 19, hugs her mother, Judy Goos, outside Gateway High School where witnesses were brought for questioning Friday, July 20, 2012, in Aurora, Colo. Emma was in the third row of the theater of the new Batman movie when the shooter entered. She helped apply pressure to a man's head who was injured. (Photo credit: AP Photo/Barry Gutierrez)

  • Police cars in front of the Century 16 theater in Aurora, Colorado where a gunman opened fire during the opening of the new Batman movie "The Dark Knight Rises" killing at least 15 people and wounding 50 others on the morning of July 20, 2012. The shooting suspect in custody after at least 12 people were shot dead and around 50 were wounded at a movie screening in the United States has been identified as 24-year-old James Holmes, US media said Friday. Television networks cited the FBI as saying that Holmes, from the town of Aurora, Colorado, scene of the midnight shooting at a screening of the Batman movie "The Dark Knight Rises," did not appear to have any known terrorism connections. (Photo credit: AFP PHOTO/JONATHAN CASTNER JONATHAN CASTNER/AFP/GettyImages)

  • Police tape cordons off the parking area around the Century 16 movie theater in Aurora, Colorado, July 20, 2012 where a gunman opened fire during the showing of the new Batman movie. At least 12 people were killed and around 50 wounded in the cinema shooting. (Photo credit: AFP PHOTO JONATHAN CASTNERJONATHAN CASTNER/AFP/GettyImages)

  • Police cars in front of the Century 16 theater in Aurora, Colorado where a gunman opened fire during the opening of the new Batman movie "The Dark Knight Rises" killing at least 15 people and wounding 50 others on the morning of July 20, 2012. The shooting suspect in custody after at least 12 people were shot dead and around 40 were wounded at a movie screening in the United States has been identified as 24-year-old James Holmes, US media said Friday. Television networks cited the FBI as saying that Holmes, from the town of Aurora, Colorado, scene of the midnight shooting at a screening of the Batman movie "The Dark Knight Rises," did not appear to have any known terrorism connections. (Photo credit: AFP PHOTO/JONATHAN CASTNERJONATHAN CASTNER/AFP/GettyImages)

  • Police cars in front of the Century 16 theater in Aurora, Colorado where a gunman opened fire during the opening of the new Batman movie "The Dark Knight Rises" killing at least 15 people and wounding 50 others on the morning of July 20, 2012. The shooting suspect in custody after at least 12 people were shot dead and around 50 were wounded at a movie screening in the United States has been identified as 24-year-old James Holmes, US media said Friday. Television networks cited the FBI as saying that Holmes, from the town of Aurora, Colorado, scene of the midnight shooting at a screening of the Batman movie "The Dark Knight Rises," did not appear to have any known terrorism connections. (Photo credit: AFP PHOTO/JONATHAN CASTNERJONATHAN CASTNER/AFP/GettyImages)

  • Police cars are seen in the parking area around the Century 16 movie theater in Aurora, Colorado, July 20, 2012 where a gunman opened fire during the showing of the new Batman movie. At least 12 people were killed and around 50 wounded in the cinema shooting. (Photo credit: AFP PHOTO JONATHAN CASTNERJONATHAN CASTNER/AFP/GettyImages)

  • Police use a video camera to look inside an apartment where the suspect in a shooting at a movie theatre lived in Aurora, Colo., Friday, July 20, 2012. As many as 12 people were killed and 50 injured at a shooting at the Century 16 movie theatre early Friday during the showing of the latest Batman movie. (Photo credit: AP Photo/Ed Andrieski)

  • Police break out a window of an apartment where the suspect in a shooting at a movie theatre lived in Aurora, Colo., Friday, July 20, 2012. As many as 12 people were killed and 50 injured at a shooting at the Century 16 movie theatre early Friday during the showing of the latest Batman movie. (Photo credit: AP Photo/Ed Andrieski)

  • Shamecca Davis hugs her son Isaiah Bow, who was an eye witness to the shooting, outside Gateway High School where witness were brought for questioning Friday, July 20, 2012 in Denver. After leaving the theater Bow went back in to find his girlfriend. " I didn't want to leave her in there. But she's ok now," Bow said. A gunman wearing a gas mask set off an unknown gas and fired into a crowded movie theater at a midnight opening of the Batman movie "The Dark Knight Rises," killing at least 12 people and injuring at least 50 others, authorities said. (Photo credit: AP Photo/Barry Gutierrez)

  • Judy Goos, second from left, hugs her daughters friend, Isaiah Bow, 20, while eye witnesses Emma Goos, 19, left, and Terrell Wallin, 20, right, gather outside Gateway High School where witness were brought for questioning Friday, July 20, 2012 in Denver. A gunman wearing a gas mask set off an unknown gas and fired into a crowded movie theater at a midnight opening of the Batman movie "The Dark Knight Rises," killing at least 12 people and injuring at least 50 others, authorities said. (Photo credit: AP Photo/Barry Gutierrez)

  • A SWAT team officer stands watch near an apartment house where the suspect in a shooting at a movie theatre lived in Aurora, Colo., Friday, July 20, 2012. As many as 14 people were killed and 50 injured at a shooting at the Century 16 movie theatre early Friday during the showing of the latest Batman movie. (Photo credit: AP Photo/Ed Andrieski)

  • Police gather near an apartment house where the suspect in a shooting at a movie theatre lived in Aurora, Colo., Friday, July 20, 2012. As many as 12 people were killed and 50 injured at a shooting at the Century 16 movie theatre early Friday during the showing of the latest Batman movie. (Photo credit: AP Photo/Ed Andrieski)

  • A SWAT team officer stands watch near an apartment house where the suspect in a shooting at a movie theatre lived in Aurora, Colo., Friday, July 20, 2012. As many as 12 people were killed and 50 injured at a shooting at the Century 16 movie theatre early Friday during the showing of the latest Batman movie. (Photo credit: AP Photo/Ed Andrieski)

  • Jacob Stevens, 18, hugs his mother Tammi Stevens after being interview by police outside Gateway High School where witness were brought for questioning after a shooting at a movie theater, Friday, July 20, 2012 in Denver. A gunman wearing a gas mask set off an unknown gas and fired into a crowded movie theater at a midnight opening of the Batman movie "The Dark Knight Rises," killing at least 12 people and injuring at least 50 others, authorities said. (Photo credit: AP Photo/Barry Gutierrez)

  • (Credit: Sky News)

  • (Credit: Sky News)

  • (Credit: Sky News)

  • (Credit: Sky News)

  • Police are pictured outside of a Century 16 movie theatre where as many as 12 people were killed and many injured at a shooting during the showing of a movie at the in Aurora, Colo., Friday, July 20, 2012. (Photo credit: AP Photo/Ed Andrieski)

  • Police are pictured outside of a Century 16 movie theatre where as many as 12 people were killed and many injured at a shooting during the showing of a movie at the in Aurora, Colo., Friday, July 20, 2012. (Photo credit: AP Photo/Ed Andrieski)

  • Aurora Police Chief Daniel Oates talks to media at Aurora Mall where as many as 12 people were killed and many injured at a shooting at the Century 16 movie theatre in Aurora, Colo., Friday, July 20, 2012. (Photo credit: AP Photo/Ed Andrieski)

  • Aurora Police Chief Daniel Oates talks to media at the Aurora Mall where as many as 14 people were killed and many injured at a shooting at the Century 16 movie theatre in Aurora, Colo., Friday, July 20, 2012. (Photo credit: AP Photo/Ed Andrieski)

  • Police are pictured outside of a Century 16 movie theatre where as many as 12 people were killed and many injured at a shooting during the showing of a movie at the in Aurora, Colo., Friday, July 20, 2012. (Photo credit: AP Photo/Ed Andrieski)

  • Police are pictured outside of a Century 16 movie theatre where as many as 12 people were killed and many injured at a shooting during the showing of a movie at the in Aurora, Colo., Friday, July 20, 2012. (Photo credit: AP Photo/Ed Andrieski)

  • People gather outside the Century 16 movie theatre in Aurora, Colo., at the scene of a mass shooting early Friday morning, July 20, 2012. Police Chief Dan Oates says 12 people are dead following the shooting at the suburban Denver movie theater. He says 50 others were injured when gunfire erupted early Friday at the Aurora theater. Oates says a gunman appeared at the front of one of the Century 16 theaters. <em>Photo Credit: Karl Gehring, <a href="http://www.huffingtonpost.com/news/exposure/" target="_hplink">Denver Post</a>. </em> / AP

  • (Photo credit: 7NewsMorning/Twitter)

  • (Photo credit: 7NewsMorning/Twitter)

  • (Photo credit: Faunte Thompson/Twitter)

  • (Photo credit: 7NewsMorning/Twitter)

  • (Photo credit: Brandon Rittiman/Twitter)

  • (Photo credit: 7NewsMorning/Twitter)

  • (Photo credit: Jakeob Bame/Twitter)