A city firefighter has been released from the hospital, one day after he was shot by a wanted felon on Staten Island.

Lieutenant James Hayes left Richmond University Medical Center earlier this afternoon.

The 31-year veteran is the first city firefighter to be shot in the line of duty since 1994.

Investigators say it all started around 5:45 a.m. Friday when a fugitive task force tried to arrest Garland Tyree for violating parole.

He refused to open the door, and set off a smoke bomb. That's when the fire department was called.

Lieutenant Hayes was shot twice when he tried to enter the home.

Tyree barricaded himself in the apartment for six hours and told officers he would surrender if he could see his mother.

She was flown in from Delaware and spoke with her son briefly before he allegedly came out of the apartment and shot at police with an AK-47.

Officers returned fire and Tyree was killed.

"Thank God no members of the NYPD were hurt, no surrounding residents of the neighborhood were hurt. That was because of the quality of the work that was done today. The patient and careful strategy," said Mayor Bill de Blasio.

Investigators say Tyree was a Bloods gang member and spent most of his life in prison.

He allegedly killed someone when he was just 16 years old, not far from the scene of Friday's shooting.

Tyree's mother says she was standing just a few feet away from her son when he was shot and killed by authorities.

"They flew me here from Delaware, then they take me into the truck, they say talk to him," said Purcell Tyree. "He say, 'Ma,' I say 'I'm here.' I says, 'Okay you know we can make it.' He says, 'Ok, I'm coming out.' Then I hear boom boom boom, I say, 'You're killing my son, you're killing my son.'"

Tyree also says she wishes she could've spoken to her son in person, instead of on the phone.