Image copyright ABC Image caption Elton Simpson has been investigated before for alleged terrorism offences

Authorities have identified the suspected gunmen who attacked an event near Dallas exhibiting cartoons of the Prophet Muhammad, US media say.

Officials have named them as Elton Simpson and Nadir Soofi, according to the New York Times and the Washington Post newspapers.

Agents were searching an apartment in Phoenix, Arizona, where Simpson reportedly lived, an FBI official said.

Two gunmen were shot dead after opening fire outside Sunday's event.

Simpson had been previously investigated on suspicion of terrorism offences, several reports said.

They drove to the Muhammad Art Exhibit in the Dallas suburb of Garland as the event was ending, firing with assault rifles on two officers in a car park.

Media playback is unsupported on your device Media caption How Texas Prophet cartoon attack unfolded

One of the officers, a traffic policeman, returned fire and killed both the gunmen, Garland police official Joe Harn said. The security officer who was with him was shot in the lower leg. He was treated in hospital and then released.

"Obviously they were there to shoot people," Mr Harn said.

'Twitter warning'

Image copyright AP Image caption Forensics teams worked at the scene of the shooting on Monday

The event was organised by the American Freedom Defense Initiative (AFDI), which is run by controversial blogger and activist Pamela Geller.

One of the keynote speakers was the Dutch politician Geert Wilders, an outspoken critic of Islam in Western societies.

The conference included a contest that offered a $10,000 (£6,600) prize for a cartoon of the Prophet Muhammad. Depictions of the Prophet Muhammad are offensive to many Muslims.

Officials believe that Simpson sent several Twitter messages before Sunday's shooting, including one with the hashtag #texasattack part of which read: "May Allah accept us as mujahideen" [holy fighters]. The Twitter account was later suspended.

Simpson was convicted several years ago for lying to authorities about his plans to travel to Somalia, court documents show.

The FBI's John Lannarelli told US media that both suspects appeared to have lived in the same Phoenix apartment, although this has not been officially confirmed.

Image copyright EPA Image caption About 200 people attended the event - they were briefed by police after the shooting

Image copyright AP Image caption Geert Wilders released a photo of himself with police in SWAT gear which he said was taken just before the attack

The bomb squad was called in to search the suspects' vehicle. They set off several controlled explosions around the vehicle, where they found additional ammunition but no bombs, Mr Harn said.

While he did not publicly name the men, he said that officials were confident they knew their identities.

The suspects' bodies remained at the scene on Monday morning, surrounded by dozens of empty shell casings.

Security had been tight ahead of Sunday's conference and Garland's mayor acknowledged that there had been a lot of local concern about the event, though police said there had been no credible threats.

A security plan had been put in place over several months, and event organisers paid $10,000 for additional security on the advice of the police, Mr Harn said.

'Anti-jihad'

Event organiser Pamela Geller said she was standing up for free speech, adding: "This terrible incident reflects the need for such conferences."

Media playback is unsupported on your device Media caption Organiser and mayor at odds over Garland cartoon contest

"We are continually abridging our freedoms so as not to offend savages," she said. She denied she was anti-Muslim, only "anti-jihad".

White House spokesman Josh Earnest said President Barack Obama was being kept informed of developments, adding: "There is no act of expression, even if it's offensive, that justifies an act of violence."

There were widespread protests in 2006 when the Danish newspaper Jyllands-Posten published cartoons satirising the Prophet Muhammad.

In January this year, 12 people were murdered by two Islamist gunmen at the French magazine Charlie Hebdo, which had published similar cartoons.

And a gathering of free speech activists in the Danish capital Copenhagen was targeted by a gunman in February, killing a film director.

Image copyright Reuters Image caption Ms Geller is an outspoken critic of Islam

Pamela Geller: America's controversial blogger

A staunch critic of Islam since 2005, she rose to prominence in 2010 through her online opposition to Park 51, a planned Muslim community centre in Lower Manhattan close to the World Trade Center site

Heads the American Freedom Defense Initiative (AFDI), which has also caused controversy by buying advertising space on buses in US cities, criticising Islam

The 56-year-old describes herself online as a free-speech activist, but her critics denounce her as a "bigot"

She insists the focus of her criticism is chiefly against radical Islam, but has been quoted as saying that "Islam is the most anti-semitic, genocidal ideology in the world"

Speaking of her role in organising the Muhammad Art Exhibit in Garland, she said: "We draw Muhammad because we are free... We draw Muhammad because our unalienable rights are enshrined in the First Amendment."

Pamela Geller: America's 'bigoted blogger'

Are you in Dallas? Did you witness the incident? You can email your eyewitness accounts to haveyoursay@bbc.co.uk.

Send your pictures and videos to yourpics@bbc.co.uk or text them to 61124 (UK) or +44 7624 800 100 (international). Or you can upload here.

Read the terms and conditions.