WASHINGTON — Since 2006, the FBI had been investigating Elton Simpson — one of the men suspected in the Texas shootings outside a contest featuring cartoons of the Muslim Prophet Muhammad.

Agents recorded the young man from Phoenix talking about fighting nonbelievers for Allah. About plans to travel to South Africa and link up with “brothers” in Somalia. About using school as a cover story for traveling overseas.

Simpson was arrested in 2010, one day before authorities say he planned to leave for South Africa. But despite more than 1,500 hours of recorded conversations, the government prosecuted him on only one minor charge — lying to a federal agent. Years spent investigating Simpson for terrorism ties resulted in three years of probation and $600 in fines and court fees.

Then, on Sunday, two men whom authorities identified as Simpson and Nadir Soofi opened fire in a Dallas suburb on an unarmed security officer stationed outside the contest. The officials spoke only on condition of anonymity because they were not authorized to discuss the investigation by name.

The deliberately provocative contest had been expected to draw outrage from the Muslim community. According to mainstream Islamic tradition, any physical depiction of the Prophet Muhammad — even a respectful one — is considered blasphemous, and drawings similar to those featured at the Texas event have sparked violence around the world.

Simpson and Soofi were wearing body armor, and one shot the security officer in the leg. Garland police spokesman Joe Harn said Monday that a single Garland police officer subdued the two gunmen but that after his initial shots, SWAT officers nearby also fired at the two men. Harn said police don’t know who fired the lethal shots.

The security officer was treated for his injury at a hospital and released.

Homeland Security Secretary Jeh Johnson said in a statement Monday that law enforcement authorities are investigating the men’s motives and all circumstances surrounding the attack.

“While all the facts are not in yet, last night’s attack serves as a reminder that free and protected speech, no matter how offensive to some, never justifies violence of any sort,” Johnson said.

Simpson, described as quiet and devout, had been on the radar of law enforcement because of his social media presence, but authorities did not have an indication that he was plotting an attack, said one federal official familiar with the investigation.

In a statement released late Monday by Phoenix law firm Osborn Maledon, Simpson’s family said it is “struggling to understand” how the incident happened.

“We are sure many people in this country are curious to know if we had any idea of Elton’s plans,” the statement says. “To that we say, without question, we did not.”

The statement, which does not identify the relatives, also says the family is “heartbroken and in a state of deep shock” and sends prayers to everyone affected by this “act of senseless violence,” especially the security guard who was injured.

Simpson had worshipped at the Islamic Community Center of Phoenix for about a decade, but he quit showing up over the past two or three months, the president of the mosque told The Associated Press.

A convert to Islam, Simpson first attracted the FBI’s attention in 2006 because of his ties to Hassan Abu Jihaad, a former U.S. Navy sailor who had been arrested in Phoenix and was ultimately convicted of terrorism-related charges, according to court records. Jihaad was accused of leaking details about his ship’s movements to operators of a website in London that openly espoused violent jihad against the U.S.

In the fall of that year, the FBI asked one of its informants, Dabla Deng, a Sudanese immigrant, to befriend Simpson and ask for advice about Islam. Deng had been working as an FBI informant since 2005 and was instructed to tell Simpson he was a recent convert to the religion.

Over the next few years, Deng would tape his conversations with Simpson with a hidden recording device accumulating more than 1,500 hours of conversations, according to court records.

“I’m telling you, man, we can make it to the battlefield,” Simpson is recorded saying on May 29, 2009. “It’s time to roll.”

In court, prosecutors presented only 17 minutes and 31 seconds during Simpson’s trial, according to court documents.

“I have to say that I felt like these charges were completely trumped up, that they were just trying to cover up what had been a very long and expensive investigation and they just couldn’t leave without some sort of charges,” Simpson’s attorney, Kristina Sitton, said.

Sitton described Simpson as so devout that he would not even shake her hand and would sometimes interrupt their legal meetings so he could pray. She said she had no indication that he was capable of violence and assumed he just “snapped.”

Less was known about Soofi, who appeared to have never been prosecuted in federal court, according to a search of court records.

Sharon Soofi, his mother, who now lives in a small town southwest of Houston, told The Dallas Morning News that she had no idea that he would turn to violence.

She said her son was “raised in a normal American fashion” and “was very politically involved with the Middle East. Just aware of what’s going on.”

“I don’t know if something snapped,” she said.

She said the last time she’d communicated with her son was last month, sending a text to wish her grandson a happy birthday.

“He put his son above everything, I thought,” she told the newspaper. “The hard thing is to comprehend is why he would do this and leave an eight-year-old son behind.”

A message left on Sharon Soofi’s voicemail by The Associated Press was not returned Monday.

On Monday, federal agents spent hours at a Phoenix apartment complex where the men apparently lived. Bob Kieckhaver, one of a number of residents who were evacuated for about nine hours from units near the men’s apartment, said one of them had a beard and wore an Islamic version of a prayer cap. He was quiet but the second man was more open and would greet others at the mailboxes. Both men were seen feeding stray cats, he said.

Simpson was quiet, never angry and a regular on the basketball court playing with young members of the mosque, said Usama Shami, president of the Islamic Community Center of Phoenix where Simpson worshipped for years. He asked questions about prayer and marriage, Shami said. And he was rattled by the FBI investigation into him years earlier. Shami said most people at the mosque knew Deng was an informant because he showed such little interest in learning about Islam.

“I’ve never seen him angry,” Shami said of Simpson. “That’s the honest truth. He was always having a grin.”

———

Van Velzer reported from Phoenix. Associated Press reporters Brian Skoloff and Paul Davenport in Phoenix and Jamie Stengle in Garland, Texas, contributed.