A man has been shot and killed by police after barricading himself in a Mariners Harbor house following a shootout that left a firefighter injured Friday morning, the NYPD said.

The man has been identified as Garland Tyree, 38. NYPD chief of special operations Harry Wedin said Tyree shot at officers after hours of hostage negotiations, with officers returning fire.

At 5:45 a.m., federal marshals were executing a search warrant at a basement apartment on Destiny Court when Tyree allegedly started a fire, the NYPD said. Firefighters were responding to that call just before 6 a.m. when Tyree opened fire and a police shootout began, the NYPD said. An FDNY lieutenant was shot twice, once in the leg and once in the buttocks, police said.

FDNY Commissioner Daniel Nigro identified the victim as Lt. Jim Hayes of Staten Island's Engine 158. This is the first time a firefighter has been shot while on duty in 21 years, Nigro said.

NYPD Commissioner William Bratton said at least four shots were fired at authorities attempting to serve the warrant on Tyree, who Bratton said has 18 prior arrests. Tyree is reportedly a member of the Bloods gang.

Hostage negotiators worked with Tyree for four hours, getting his girlfriend, sister and eventually his mother on the phone, according to officials. Hostage negotiators had Tyree's mother flown in from Delaware to Staten Island, and he exited the home after speaking to his mother.

On a Facebook page belonging to a Staten Island man named Garland Tyree, a status update posted Friday read: "Today I die." The comment prompted questions and concerns from friends. "They kicked in my door and it popped off," Tyree wrote.

-- With Reuters