The officer who returned fire at two men who shot assault rifles outside an event displaying cartoons of the Prophet Mohammad "probably saved lives," according to authorities.
Security at Sunday's event in Garland, Texas, included uniformed officers, SWAT teams, FBI and ATF, according to Joe Harn of the Garland Police, when two men pulled up in a dark-colored car.
The men exited and -- both armed with assault rifles -- started firing at a parked police car, Harn said.
Shooting Outside Garland, Texas Community Center Garland Shooting: American Freedom Defense Initiative Spent $10,000 on Security One of Garland, Texas Shooting Suspects ID'd, Official SaysAn officer -- who typically works as a traffic cop -- returned fire and struck both men, Harn said.
Both suspects died on the street.
"[The officer] did what he was trained to do," Harn said.
The hero officer was not identified by name.
One security guard was injured in the attack with a gunshot wound to the lower leg. He was treated at a hospital and released, Harn said.
"He did a very good job," Harn said, adding that the officer "probably saved lives."
According to Harn, the suspects could not get past the outside perimeter, which was part of the police's security strategy.
"We think [the suspects'] strategy was to get to the event center [and] into the event center," he said. "We were able to stop those men before they were able to... shoot anyone else."
Get real-time updates as this story unfolds. To start, just "star" this story in ABC News' phone app. Download ABC News for iPhone here or ABC News for Android here.