Federal agents for years monitored one of the two gunmen who were shot dead after opening fire with assault rifles at a heavily guarded Texas exhibit of caricatures of the Prophet Mohammad.
Two government sources who asked not to be named said the shooters were roommates Elton Simpson and Nadir Soofi, of Phoenix. Court documents show that Simpson had been under surveillance since 2006 and was convicted in 2011 of lying to FBI agents over his desire to join violent jihad in Somalia.
FBI agents and police searched the two men's home at the Autumn Ridge Apartments in north-central Phoenix, cordoning off the complex and evacuating residents for several hours in the early morning.
The shooting incident in the Dallas suburb of Garland was an echo of past attacks or threats in other Western countries against images depicting the Prophet Mohammad. In January, gunmen killed 12 people in the Paris offices of French satirical magazine Charlie Hebdo in what was said to be revenge for its cartoons.
The Texas incident unfolded on Sunday, when a car drove up behind an indoor arena in Garland, where 200 people were attending an event featuring caricatures of the Prophet Mohammad. Such portrayals are considered offensive by Muslims.
Two men jumped from the car and fired at a police car that was blocking an arena parking lot entrance. A Garland police officer and an unarmed security guard were in the squad car and began to exit as the vehicle approached. The gunmen wounded the security guard, and the police officer returned fire, killing both assailants.
Those inside the Curtis Culwell Center, who had gone through heavy security to enter the event, were not aware of the attack until afterward.
"At this point it does seem clear that an officer of the Garland Police Department acted quickly and decisively and thereby likely saved a number of innocent lives," US Homeland Security Secretary Jeh Johnson said in a statement.
Police and federal agents had planned security for months ahead of the event, organized by American Freedom Defense Initiative (AFDI), a free-speech organization that the Southern Poverty Law Center has described as a hate group, and which paid US$10,000 for extra protection.
The event, the "Muhammad Art Exhibit and Contest," offered a $10,000 prize for the best artwork or cartoon depicting the Prophet. Artist Bosch Fawstin won for a depiction of a sword-wielding Prophet in a turban shouting, "You can't draw me."
The AFDI has, among other activities, sponsored anti-Islamic advertising campaigns in transit systems across the country.
The shooters wore protective gear and had extra ammunition in their car, Garland police spokesman Joe Harn said. Police feared that there may have been explosives in the vehicle, but no bomb was found.
"Obviously they were there to shoot people," Harn said at a news conference.
A bomb squad, the Federal Bureau of Investigation, a SWAT team and the US Bureau of Alcohol, Tobacco, Firearms and Explosives had been involved in preparations for security around the controversial exhibit, Garland police said.
In Phoenix, policed searched the men's apartment and a white van parked outside, with its side windows broken.
Bob Kieckhafer, 54, who lives one floor above and across from their apartment, said FBI and other law enforcement in SWAT gear evacuated people in the building at 11 pm Sunday and did not let them back until 4 am Monday.
He described the men who lived in the apartment as "just like your next-door-neighbor type of guys."
Wanted to join jihad
Simpson was charged in 2010 with lying to FBI officials over discussions he had with an informant about his desire to travel to Somalia to engage in violent jihad and waived his right to a jury trial.
US District Judge Mary Murguia in 2011 found him guilty of making a false statement. She found insufficient evidence to conclude the false statement involved international terrorism.
Simpson was sentenced to three years probation and ordered to pay $600 in fines and penalties.
The court documents say federal authorities began monitoring Simpson in 2006 because he was associated with an individual the FBI believed was trying to set up a terrorist cell in Arizona.
At one point, according to the documents, the FBI tried "unsuccessfully" to put Simpson on a US government no-fly list.
Simpson's father told ABC News his son was "always a good kid" but said they had "some very serious differences."
"We are Americans and we believe in America," Dunston Simpson told ABC News. "What my son did reflects very badly on my family."
US government sources close to the case said investigators are scouring electronic communications sent and received by the dead suspects for evidence of contacts between them and militant groups overseas, most notably the Syria-based Islamic State.
Social media posters claiming affiliation with the group, including a British Twitter user who has been described as one of Islamic State's top computer experts, have praised the attackers, though experts warn that militant groups have been known to claim credit for attacks with which they were never involved.