This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

WAKEFIELD, the Bronx — A fugitive who shot a state trooper in Massachusetts days before Thanksgiving was killed during a Bronx shootout with U.S. marshals that left four officials officers injured, including two who were shot, according to law enforcement.

Police said the gun battle happened around 5:30 a.m. at a home on Ely Avenue, in the Wakefield section of the Bronx.

According to Chief of Detectives Rodney Harrison, the marshals went to the Bronx apartment after receiving information that Andre K. Sterling, a suspect in a November shooting of a Massachusetts state trooper, was hiding out there.

READ MORE: Suspect killed in Bronx shootout had relatively minor criminal history until recent weeks

“The owner of the apartment opened the door,” Harrison told PIX11 News. “Sterling started shooting and U.S. marshals in the vestibule started shooting back.”

Two marshals were wounded. One was shot in the arm and thigh, while the other was shot in the leg, according to police. Federal officials say the marshals are expected to recover.

A third marshal was hurt, and an NYPD detective suffered a knee injury while carrying the wounded marshals from the scene, Harrison said.

Sterling, 35, was shot multiple times and died at the scene, the NYPD chief said.

Law enforcement sources initially told PIX11 that all three marshals had been shot.

The man who lived in the apartment, Grant Granderson, will be criminally charged with harboring a fugitive, according to Harrison.

The NYPD said Granderson was hospitalized for head injuries from Friday’s melee after being taken into custody at the scene.

Before being discovered at Granderson’s apartment, Sterling had been wanted in the shooting of 28-year-old Massachusetts state trooper John Lennon on Nov. 20 during a traffic stop in the Cape Cod city of Hyannis, authorities said.

According to police, Sterling shot the trooper in the hand before fleeing the scene in his vehicle.

The Associated Press contributed to this report.