A former city police officer who became a police officer in Texas has been killed in a shootout.

Police in Euless, Texas say 29-year-old David Hofer answered a call of shots being fired Tuesday afternoon.

When Hofer and other officers arrived on the scene, the gunman opened fire on them.

Hofer was shot and later died.

The shooter was killed by police.

Sources tell NY1 that Hofer was a member of the NYPD from 2009 to 2014 and worked out of the 9th Precinct on the Lower East Side.