Two D.C. police officers were awarded the department’s Medal of Valor this week for arresting a wanted suspect who authorities said opened fire on them with two guns as he tried to escape capture.

The officers — Kirkland Thomas and Bradley Bennett, both of the 7th District — were not struck by gunfire. At least one fired back but missed. The suspect they arrested was wanted in Prince George’s County on an attempted murder charge in connection with a stabbing of his girlfriend in March.

The incident occurred March 23 while Thomas was patrolling in the 600 block of Mellon Street SE and saw people who appeared to be gambling.

Police said the officer noticed a man who matched a description of a suspect wanted on an outstanding warrant. But the man had dreadlocks, while the picture on the warrant showed a man with short hair. Police later said the suspect was wearing a wig.

Thomas flagged down Bennett, who was riding a mountain bicycle, to help investigate. D.C. Police Chief Cathy L. Lanier said at the time of the incident that the man pulled guns from a knapsack strapped to his chest and opened fire as the officers approached.

Police said the shooter fired his weapon over several blocks as he fled on foot, striking five vehicles with bullets. The windshield of one vehicle, which was stopped at a traffic light, was hit. The driver was not injured. Court documents say the officers chased the gunman along several alleys and streets, at one point jumping over fences, and that he “kept turning around, facing [one of the officers], firing back at him.”

D.C. Police Assistant Chief Peter Newsham called the arrest “one of the most professional pursuits I have seen in my career.”

“Both of these men protected the community and each other that day,” Police Commander Vendette Parker said in statement.

Police arrested Richard Butler III, 34, and charged him with assaulting police officers, assault with a dangerous weapon and weapons violations. Butler also faces the attempted murder charge in Prince George’s County, along with sexual assault and arson charges, in the same jurisdiction. Court records show Butler has been convicted of three previous felonies in the District, Maryland and Virginia.