A gang leader with a violent past was fatally shot by police Friday on Staten Island, ending a six-hour standoff in which a firefighter was wounded and the suspect's mother was rushed to the scene in a last-minute bid to end things peacefully.

About 90 minutes into the morning siege, police officials said Garland Tyree's Facebook page had an ominous post: "Today I die."

Police said Tyree, 38, a high-ranking member of the Bloods street gang, was shot after he emerged from the apartment he had been holed up in.

See alsoWatch the video reportphotosRecent NYC mug shotsSee alsoMajor NYC crime

Instead of an expected surrender, Tyree opened fire with an assault rifle, police said. No officers were injured.

Minutes before, Rosanne Purcell had talked with her son by telephone from a special police van. Purcell had been flown in from Delaware in an NYPD helicopter, officials said.

Tyree and his mother said they loved each other, and then he told her he was "Coming out now, Mama," said Lt. Jack Cambria, the NYPD's top hostage negotiator.

advertisement | advertise on newsday

"Immediately after we had been told by Lt. Cambria that [Tyree] was going to surrender, we heard gunshots from one side of the building," said Chief Harry Widon, who noted that one of the bullets hit a police vehicle.

Tyree, wearing a bulletproof vest, then ran from the rear of the Destiny Court address where his girlfriend lives and started firing at cops. Bullets struck police vehicles and a private house, said Widon, who oversees the emergency services unit.

"Our officers immediately returned fire," Widon said. A police medic determined that Tyree was dead at the scene.

Get the Newsday Now newsletter!

The best of Newsday every day in your inbox.

The standoff started shortly after federal marshals and police detectives arrived at the apartment at about 5:45 a.m. to serve him with a warrant for violating his federal probation.

Widon said Tyree refused to open the door and ignited a commercial-grade smoke bomb inside the apartment, prompting the officers to call the fire department.

One of the firefighters who responded, Lt. Jim Hayes, was shot in the buttocks and left leg by Tyree and had to be dragged to safety, officials said. Hayes, 53, was listed in stable condition with nonlife-threatening injuries at Richmond University Medical Center.

At an afternoon news conference on Staten Island with Mayor Bill de Blasio, Police Commissioner William Bratton said, "This is not how we want these kinds of negotiations to end."

"The officers at this scene were exemplary today, despite the outcome," he added.

advertisement | advertise on newsday

De Blasio -- criticized on social media for working out at his Park Slope, Brooklyn, gym for at least 80 minutes and stopping for an espresso as the standoff unfolded -- later visited the injured Hayes.

Chief of Detectives Robert Boyce said Tyree had 18 prior arrests and was "a very dangerous man."

Officials said he was convicted in 1995 of weapons charges connected to a murder and subsequently was convicted of two slashing assaults while in custody. He was convicted in 2004 on federal gun charges and was sentenced to 10 years in prison.

Defense attorney Susan Kellman, who represented Tyree in the 2004 case, said he was "so, so smart" -- earning his GED in prison and trying to help other inmates get educated.

According to Tyree's Facebook page, he founded Real Write Publishing in 2012 to bring "realistic urban fiction" to the public from street-smart authors.

advertisement | advertise on newsday

Kellman said Tyree, who had been on probation since last summer, would do anything to avoid returning to prison.

"He was not going to go back," she said.