Two gunmen were killed after opening fire on a security officer outside a contest for cartoon depictions of Prophet Mohammed in Texas and a bomb squad was called in to search their vehicle.

The men drove up to the Curtis Culwell Centre in the Dallas suburb of Garland as the contest was scheduled to end and began shooting at a security officer, the City of Garland said.

Garland police officers returned fire, killing the men.

Officer Joe Harn, spokesman for the Garland police department, said: "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."

Police are not aware of any continuing threat and had not received any credible threats before the event.

Mr Harn said it was not clear if the shooting was connected to the event inside, hosted by the New York-based American Freedom Defence Initiative (AFDI), and awarding 10,000 dollars (£6,600) for the best cartoon depicting the Prophet Mohammed.

Such drawings 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 Mohammed - even a respectful one - is considered blasphemous.

The centre, a school district-owned public events space, was evacuated, as were some surrounding businesses.

Police blocked off a large area around the centre. There was a heavy police presence, and police helicopters circled overhead as bomb squads worked on the car.

The authorities have not removed the bodies of the gunmen, who have not yet been identified, Mr 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. He was treated at a local hospital for injuries and then released.

After the shooting, about 75 attendees at the contest were escorted to another room in the conference centre. They were then taken to a separate location, and were told they could not leave until FBI agents arrived to question them.

Johnny Roby of Oklahoma City, Oklahoma, was attending the conference. He said he was outside the building when he heard around 20 shots that appeared to be coming from the direction of a passing car.

There were then two single shots, and he heard officers yell that they had the car before he was sent inside the building.

Pamela Geller, president of the AFDI, said before the event that she planned the contest to make a stand for free speech in response to outcries and violence over drawings of Mohammed.

Though it remained unclear several hours after the shooting whether it was related to the contest, she said afterwards that the shooting showed how "needed our event really was".

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.

Another deadly shooting occurred the following month at a free speech event in Copenhagen featuring an artist who had caricatured the prophet.

Ms Geller's group is known for mounting a campaign against the building of an Islamic centre close to the World Trade Centre site in New York City, and for buying advertising space in cities across the US criticising Islam.