WASHINGTON — Federal investigators learned several hours before a provocative cartoon contest in Texas that a man under investigation for extremist activities might show up, but had no indication that he planned to attack the event, FBI Director James Comey said Thursday.

The information about Elton Simpson was developed about three hours before the event, which the FBI had already identified as a potential target for violence because it involved cartoons depicting the Prophet Muhammad. Both he and his roommate, both from Phoenix, opened fire outside the cultural center but were shot dead by an unarmed security officer stationed outside.

Simpson, previously convicted as part of a terrorism-related investigation, had come under new investigation in recent months, authorities have said. When the FBI learned that he could be heading toward the event, the agency sent an intelligence bulletin to police in Garland, including a picture and other information about Simpson.

Even so, Comey said, "we didn't have reason to believe that he was going to attack the event. In fact, we didn't have reason to believe that he had left Phoenix."

In his first public comments on the Sunday shooting, Comey said the FBI was still evaluating whether there was anything else that could have been done to prevent the attack.

"What I've seen so far looks like we did it the way we were supposed to do it," Comey said.

Simpson came under FBI investigation in 2006 and was convicted five years later following a terrorism-related investigation stemming from what prosecutors said were his plans to travel to Somalia to fight alongside extremists there. He was sentenced to three years of probation for lying to a federal agent.

The FBI continued to track him for several years after that, but closed the investigation last year. In March authorities opened a new investigation into his activities after suspecting a "renewed interest in jihad" in connection with the Islamic State group, Comey said.

He said that investigation was "open, but far from complete" at the time of the shooting.

The FBI had been closely monitoring the event, even establishing a command post at its Dallas field office. Drawings such at the ones featured at the event are deemed insulting to many followers of Islam and have sparked violence around the world. Mainstream Islamic tradition holds that any physical depiction of the Prophet Muhammad, even a respectful one, is blasphemous.

The attempted attack is part of what authorities have long considered an alarming trend involving homegrown extremists for whom technology makes it easier to be exposed to Islamic State propaganda through social media such as Twitter. There are thousands of English-language Twitter users who follow the Islamic State around the world and hundreds in the United States, according to Comey.

The terror group encourages its followers to travel to Syria to join the self-created caliphate there, but if they can't do that, to "kill where you are."

"The siren song sits in the pockets, on the mobile phones, of the people who are followers on Twitter," Comey said. "It's almost as if there's a devil sitting on the shoulder, saying, 'Kill! Kill! Kill! Kill!' all day long."

Follow Eric Tucker on Twitter at http://www.twitter.com/etuckerAP