GARLAND, Texas -- Two gunmen were killed after opening fire on a security officer outside a contest for cartoon depictions of Prophet Muhammad and a bomb squad was called in to search their vehicle as a precaution, authorities said.

The men drove up Sunday night as the contest in suburban Dallas was scheduled to end and began shooting at a security officer, the City of Garland said in a statement. Police officers returned fire, killing the men.

"Because of the situation of what was going on today and the history of what we've been told has happened at other events like this, we are considering their car (is) possibly containing a bomb," Officer Joe Harn, a spokesman for the Garland Police Department, said at a news conference.

The cartoon contest was hosted by the New York-based American Freedom Defence Initiative, which offered an award of $10,000 for the best cartoon depicting the Prophet Muhammad.

FBI spokesman Perryn Collier on Monday confirmed its investigation had expanded to Arizona, where a Phoenix residence was being searched for indications of what prompted the shooting.

ABC News cites a senior FBI official in reporting that one of the gunmen, a resident of the Phoenix apartment, was known to authorities and was the subject of an investigation. The ABC report says the man was convicted five years ago of lying to federal agents about plans to travel to Africa, in an apparent attempt to join a terror group there.

The event featured a speech by Geert Wilders, a Dutch lawmaker known for his outspoken criticism of Islam. Wilders received several standing ovations as he quoted former President Ronald Reagan and Texas founding father Sam Houston.

"Muhammad fought and terrorized people with the swords. Today, here in Garland, we fight Muhammad and his followers with the pen. And the pen, the drawings, will prove mightier than the sword," Wilders said during his speech.

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

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 Muhammad. Another deadly shooting occurred the following month at a free speech event in Copenhagen featuring an artist who had caricatured the prophet.

The Curtis Culwell Center, a school district-owned public events space, was evacuated earlier Sunday, as were some surrounding businesses. Police blocked off a large area around the centre Sunday night. There was a heavy police presence, and police helicopters circled overhead as bomb squads worked on the car.

Authorities haven't removed the bodies of the gunmen, who have not yet been identified, Harn said. The bodies are too close to the car to be removed, but that will happen once the scene is clear, he said.

The security officer who was shot worked for the Garland Independent School District, Harn said. He was treated at a local hospital for injuries and had been released Sunday night.

After the shooting, about 75 attendees at the contest were escorted by authorities to another room in the conference centre. They were then taken to a separate location, where an Associated Press reporter was told they could not leave until FBI agents arrived to question them.

Pamela Geller, president of the AFDI, told the AP before Sunday's event that she planned the contest to make a stand for free speech in response to outcries and violence over drawings of Muhammad. Though it remained unclear several hours after the shooting whether it was related to event, she said Sunday night that the shooting showed how "needed our event really was."

Geller's group is known for mounting a campaign against the building of an Islamic centre blocks from the World Trade Center site and for buying advertising space in cities across the U.S. criticizing Islam.

When a Chicago-based non-profit held a January fundraiser in Garland designed to help Muslims combat negative depictions of their faith, Geller spearheaded about 1,000 picketers at the event. One chanted: "Go back to your own countries! We don't want you here!" Others held signs with messages such as, "Insult those who behead others," an apparent reference to recent beheadings by the militant group Islamic State.