Two government sources who asked not to be named said the gunmen were roommates Elton Simpson and Nadir Soofi, of Phoenix. Court documents show 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.
The shooting in the Dallas suburb of Garland was an echo of 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.