A man wanted in the shooting of a Massachusetts state trooper two weeks ago was killed in New York early Friday after opening fire on three U.S. Marshals, two of whom were wounded in the ensuing gun battle, according to reports.

The suspect, identified as 35-year-old Andre Sterling, had been wanted in the Nov. 20 shooting of a Massachusetts state trooper who was wounded in the hand, reports said.

The two wounded Marshals were reportedly in good condition after taking on gunfire at a residence on Ely Avenue in the Wakefield section of the Bronx, according to multiple news outlets.

Reports said three Marshals and an officer with the New York Police Department were serving a warrant for the suspect about 5:30 a.m. when shots rang out.

During the exchange, one Marshal was hit in the upper body, possibly the elbow, and another was hit in the leg, according to The Associated Press.

The third Marshal and the NYPD officer were not hit, according to wide-ranging reports.

Investigators remained at the scene late into the morning.

Earlier reports said three Marshals had been shot, but that was later corrected by officials to only two confirmed wounded.

A second man who was in the apartment with Sterling was taken into custody, officials told the AP.

Sterling was being sought in the shooting of a 28-year-old trooper during a late-night traffic stop in Hyannis, on Cape Cod. The trooper was hospitalized after a round went through his right hand and appeared to have struck his ballistic vest.

On Friday, three Marshals looking for Sterling took on fire as soon as they entered the Bronx home where they believed Sterling was located, one of the law enforcement officials told the AP.

One Marshal was hit in the upper body and another was hit in the leg, the official said. Both were hospitalized.

Sterling had two more warrants in Massachusetts on charges including identity fraud and assault and battery on a police officer, and he was wanted on narcotics charges in Wyoming, according to police in Massachusetts.

A gun was recovered at East 233rd Street and Ely Avenue, according to reporter Yan Kaner.

The dead suspect’s identity was confirmed by a reporter with ABC7.

The two U.S. Marshals were initially listed in stable condition, according to reporter Jonathan Dienst, but as of 10:20 a.m. both officers had been upgraded to good condition, according to the AP.

Police and an ambulance went to the Jacobi Medical Center in the Bronx after the shooting, according to reporter Anthony DiLorenzo.

This is a developing story. Please return to AJC.com throughout the day for updates. Information provided by The Associated Press was used to supplement this report.