Police identified the officer Thursday as Donald Muir Jr., a nine-year veteran assigned to the Northwest district. Police said officers in the 5000 block of Pimlico Road heard shots Tuesday evening, then saw a man emerge from an alley holding a handgun that he refused to drop. Muir then shot the man, police said. Charges are pending against the man, whom police have not yet identified.

In 2007, Muir shot a man four times in an attempted drug bust. In that case, Muir and other plainclothes officers arrested Fenyanga Muhammad, also known as Donnie Chestnut, alleging he had swallowed drugs, resisted arrest and tried to grab the gun of one of the officers.

Muhammad was acquitted in 2010 after a city jury heard his account of how officers grabbed him from behind, causing him to choke on a Popsicle stick, and how drugs were never found in his system. He was shot three times in the back and once in the hand. Muhammad won a $40,000 civil lawsuit against the Police Department in February 2011.

This year, Baltimore police have shot six people, compared with 15 police-involved shootings in all of 2012.

A 31-year-old man who was sentenced to 20 years in prison in Baltimore after he pleaded guilty to possessing 5.9 grams of marijuana won an appeal Wednesday invalidating the plea — raising the possibility that he will be released.