The Syria- and Iraq-based Islamic State (IS) said on its official online radio station that "two soldiers of the caliphate" carried out the attack on Sunday (local time) in Garland, a suburb of Dallas.
U.S. officials said while the Islamic State's claim of responsibility for the failed Texas attack was being examined closely, investigators at this point did not know whether the dead militants launched the attack under instructions from the group or whether IS was opportunistically claiming credit for an attack in which it had little or no direct or indirect involvement.
One U.S. official said investigators believed it was possible, if not likely, that Islamic State played an "inspirational" rather than "operational" role in the attack.
That would mean the shooters may have immersed themselves in items posted online by IS and other groups like al Qaeda in the Arabian Peninsula intended to incite violence, but that the group played no role in directing an attack on the Mohammad cartoon event.
U.S. investigators were going through the shooters' computers and communications devices, officials said.
'MIGHT HAVE SNAPPED'
Authorities said roommates Elton Simpson and Nadir Soofi of Phoenix were fatally shot by a police officer when they opened fire with assault rifles in a parking lot outside the cartoon exhibit and contest. An unarmed security guard suffered a minor wound.
Court documents showed Simpson had been under federal surveillance since 2006 and was convicted in 2011 of lying to FBI agents about his desire to join violent jihad in Somalia.
"I believe that perhaps he might have just snapped when he heard about the cartoon contest," Kristina Sitton, a Phoenix attorney who defended him in the case, told CNN.
Sitton said Simpson had never shown any desire to join violent jihad.
Soofi was a popular student at an elite school in Pakistan but struggled to adjust to life after moving to the United States as a teen, friends said on Tuesday.
Soofi's story appeared to trace a familiar arc for some Western Islamists - disappointment, alienation, and a search for belonging that ended with the embrace of militancy.
The shooting in Garland, an ethnic melting pot in a city of about a quarter million people, was an echo of attacks or threats in other Western countries against images depicting the Prophet Mohammad.
In another Dallas suburb, Richardson, police were investigating an attack by two men on a worshipper leaving evening prayers at a mosque on Monday.
"It is too early to say whether this was a hate crime or an attempted robbery," said Richardson Police Sergeant Kevin Perlich, a spokesman.
The man was treated on the scene for minor injuries.
Police and federal agents had planned security for months ahead of the Garland event, organized by American Freedom Defense Initiative (AFDI), a free-speech organization that the Southern Poverty Law Center has described as a hate group.
In January, gunmen killed 12 people in the Paris office of French satirical magazine Charlie Hebdo in what was said to be revenge for its cartoons. Such portrayals are considered offensive by Muslims.