Police in Baltimore fatally shot an armed 18-year-old man Tuesday during a foot pursuit, one day after he was released from jail on gun and drug charges, authorities said.

At around 3 p.m., officers in the Tri-District area saw a vehicle with up to five occupants driving erratically, Baltimore Police spokesman T.J. Smith said at a news conference. When one occupant bailed out of the vehicle, an officer pursued him to the area of Frederick Avenue and Monroe Street.

In an alley, the officer caught up with the suspect, who was armed with a gun, and shot him, Smith said. The suspect was transported to Maryland Shock Trauma Center, where he was pronounced dead. The gun was later recovered at the scene.

Smith said the suspect, whose name was not released pending notification of relatives, had been arrested twice in the past month on gun and drugs charges.

“That’s really despicable, because it’s putting our officers and our citizens in harm’s way,” Smith said.

The officer who shot the man will be identified within 48 hours, and will be put on routine administrative duties, Smith said. The officer was wearing a body camera that was on during the shooting, according to Smith.

[Baltimore officials and Justice Department announce agreement to revamp police practices]

Baltimore police have been under increased scrunity since the death of Freddie Gray in 2015 and the riots that followed. Last month, officials announced an agreement with the Justice Department to change police practices that may lead to excessive force.

Smith did not say whether the events that led to the shooting were in line with the changes outlined the consent degree.

“What’s not in line is a person with a gun,” he said.

This story has been updated.