March 7, 2016 | 4:16pm   

 

Hundreds of cops mourn ex-NYPD officer slain in Texas

By Vinita Singla

John Roca
NYPD officers exit St. Patrick's Cathedral after a memorial service for David Hofer.

Hundreds of cops poured into St. Patrick’s Cathedral on Monday to mourn a fallen former NYPD officer who had moved to Texas to escape New York City’s dangerous streets.

    
  David Hofer

David Hofer, who left the NYPD in 2014 after five years to work as a cop in a Dallas suburb, was killed during a shootout with a drug suspect there last week.

The Brooklyn native had spent the first few years of his police career in Manhattan’s Ninth Precinct in the East Village.

“He was one of the funniest guys I ever knew. He lit up a room,’’ said pal Jamie Gensen, who was among the sea of blue at the officer’s funeral.

Although Hofer left the NYPD several years ago, police-union President Pat Lynch said that the 29-year-old cop will always be remembered as one of New York’s Finest.

“We come here together because we’re family,” Lynch said. We have our family at home. We have our family on the street. He’s part of both.’’

Hofer had proposed to his girlfriend, Marta Danylyk, less than two months ago — getting down on one knee while still in his police uniform after she accompanied him on a ride-along.

On Monday, Danylyk wore her diamond engagement ring as she trailed behind an NYPD officer carrying her fiancé’s ashes in a small cherry-wood urn.

    
  John Roca
  David Hofer’s fiancee, Marta Danylyk

The box of ashes was carried inside the cathedral and placed on an altar next to a sign of blue and white flowers that read, “Blue Lives Matter,” as “Amazing Grace” played and Danylyk quietly wept.

Sitting nearby were Hofer’s parents, Sonja and Helmut Hofer.

His mom told The Post shortly after his death that he had fled the mean streets of the city for the more quiet suburb of Euless, Texas.

“He was working this very difficult [Manhattan] precinct, so he had a lot of traumatic experiences . He ­decided to go to a safer place,” she said.

Hofer was gunned down last Tuesday afternoon allegedly by a meth addict waiting to “ambush” cops hours after he was let loose by authorities following a public-intoxication arrest, according to The Dallas News.

The alleged perp, Jorge Brian Gonzalez, 22, had a history of run-ins with the Euless police in connection to his drug use, including an incident in which he allegedly stole more than $2,000 from his father.

Gonzalez was also killed in the shootout after other officers fired back at him.

His father, Jorge Antonio Gonzalez, blamed the judge for releasing him from jail in the first place, saying, “It’s their fault. Why would they let him out when he was on that stuff?”