Jobin Panicker, WFAA-TV, and John Bacon

USA TODAY

GARLAND, Texas — Two Phoenix roommates armed with assault rifles and poised to storm an event featuring cartoons of the prophet Mohammed were fatally shot by a traffic cop who probably saved many lives, police said Monday.

One of the attackers had been convicted of terrorism-related charges in 2011 after telling an FBI informant he wanted to kill non-Muslims. Police spokesman Joe Harn said the officer who killed both attackers was a traffic officer who "did what he was trained to do."

Harn said, "Under the fire he was put under, he did a very good job and probably saved lives. We think their strategy was to get into the event center, but they were not able to get past the outer perimeter."

The Muhammad Art Exhibit and Contest at the Curtis Culwell Center, outside Dallas, was coming to a close Sunday night when the suspects drove up to a parking lot entrance blocked by a patrol car. Wearing body armor, the suspects got out of their car and started shooting with assault rifles, Harn said.

A security guard, who was not armed, was shot in the leg. The police officer who was with him then fatally shot both suspects with his duty pistol, Harn said.

The security officer, a Garland Independent School District employee, was identified as Bruce Joiner. He was treated at a hospital and released.

The exhibit was placed on lockdown and the 200 attendees later moved to a nearby high school while the car and nearby areas were checked for explosives. None were found, Harn said.

Harn said event organizers had paid $10,000 for added security at the event, and a SWAT team and bomb squad were on site when the shooting erupted.

The FBI said the two suspects lived in an apartment in northwest Phoenix, and federal agents began searching that complex Monday. Harn declined to name the suspects. Federal law enforcement officials, however, confirmed their identities as Elton Simpson and Nadir Soofi.

Simpson, 30, was sentenced to three-years' probation and fined $500 in August 2011, following his conviction for making false statements in a Phoenix terrorism investigation. The judge, however, said the evidence was not sufficient to find that the false statements involved international or domestic terrorism.

Beginning in 2009, the FBI was investigating whether Simpson and some of his associates were planning to travel to Somalia to join jihad waged by the terror group al-Shabaab.

Simpson told an FBI informant that he was tired of living under non-Muslims, and that his money and taxes were being used to buy weapons, court documents show.

"It's time, I'm telling you, man,'' Simpson said in a May 2009 recorded conversation with the informant. "We gonna make it to the battlefield…it's time to roll.''

In a statement Monday, U.S. Homeland Security Secretary Jeh Johnson said the Sunday night attack "serves as a reminder that free and protected speech, no matter how offensive to some, never justifies violence of any sort. This attack also underscores the importance of close collaboration between federal, state and local authorities in our Nation's homeland security efforts, as well as public awareness and vigilance."

But he urged that Americans "not misdirect anger and suspicion at those simply because of their religious faith."

"The strengths and heritage of this Nation include our racial, religious and ethnic pluralism, and our acceptance and inclusiveness of others different from ourselves," Johnson said.

The Council on American-Islamic Relations, the largest U.S. Muslim civil rights and advocacy organization, condemned the attack "without reservation."

"We also reiterate our view that violence in response to anti-Islam programs like the one in Garland is more insulting to our faith than any cartoon, however defamatory," the group said in a statement. "Bigoted speech can never be an excuse for violence."

"Muslims in North Texas and across the nation are shocked and saddened by this inexcusable attack and pray for the speedy recovery of the officer injured by the attackers," CAIR said.

A group called the American Freedom Defense Initiative hosted the Mohammed cartoon exhibit and $10,000 cartoon contest. A keynote speaker was Dutch politician Geert Wilders, leader of the right-wing Party of Freedom, who has advocated a ban on the Quran.

The exhibit featured "images of Islam's prophet, both historic and contemporary, and speeches by leading voices of freedom and internationally renowned free speech advocates," according to a press release by the group.

Such drawings are deemed sacrilegious to many followers of Islam and have sparked violence around the world. According to mainstream Islamic tradition, any physical depiction of the prophet Mohammed — even a respectful one — is considered blasphemous.

The contest attracted about 350 submissions worldwide. The People's Choice Award was won by U.S.-based cartoonist and blogger Bosch Fawstin, who submitted six drawings.

His winning entry featured an angry, turban-wearing Mohammad brandishing a sword and telling an artist, "You can't draw me." The artist continues sketching, replying, "That's why I draw you."

In a Twitter post Monday, Fawstin wrote of Sunday's attack: "They came to kill us and died for it. Justice."

Fawstin says he was born a Muslim to Muslim parents but left his religion and is now a "radical critic of Islam." He created Pigman, "the anti-jihad superhero," and several cartoons on his blog depict Mohammed.

In January, 12 people were killed by gunmen in an attack against the Paris office of the satirical newspaper Charlie Hebdo, which had lampooned Islam and other religions, and used depictions of Mohammed.

Shortly after that attack, he wrote, "To honor those who've died for Free Speech, I don't raise my pen up in the air, I put it to paper & draw Mohammed."

The American Freedom Defense Initiative and its president, Pam Geller, had pressed a campaign against the building of an Islamic center blocks from the World Trade Center site and has bought advertising space in cities across the U.S. criticizing elements of Islam.

"This is a war,'' Geller posted on her website PamellaGeller.com. "This is war on free speech. What are we going to do? Are we going to surrender to these monsters?''

In its response Monday, CAIR singled out Geller, Wilders and others behind the Garland event, saying that "all seek to provoke a downward spiral of mutual hostility and mistrust in America and around the world."

"People of good will must work together to ensure that extremists of all faiths and backgrounds do not accomplish that malevolent goal," the group said.

Contributing: William M. Welch, Kevin Johnson and Michael Winter, USA TODAY