An armed man demanding methadone at a Baltimore drug clinic was killed in a gun battle that left another man dead and a shot cop among the injured, according to authorities.

The gunman, yet to be identified, took a female employee hostage at the Man Alive clinic at 7 a.m. Monday and demanded to be let into an area where the medication is kept, witnesses told the Baltimore Sun.

“Open that [expletive] door or I’m going to shoot you!” he shouted, according to George Dowler, 61, who told the Sun the gunman, who had already fired shots, let the staffer go once she let him into the drug area.

Officers had tried to enter several times but were held back by gunfire, police commissioner Michael Harrison said at a press conference.

“As the suspect fired upon our officer, he returned gunfire but was struck by the suspect’s rounds,” Harrison said of one of the cops.

Sgt. Billy Shiflett, 51, was hit in the abdomen under his bulletproof vest during the gun battle. He was listed in serious but stable condition after surgery, Harrison said.

The gunman was killed in the gun battle with cops, and another man was also found fatally shot. He was not immediately identified and police did not say if he was a patient or staffer, or when he was shot.

A woman who works at the clinic was also taken to a hospital with non-life-threatening injuries, according to the Sun report.

“This was a dangerous situation that could’ve been far worse for our officers, but they showed extreme courage, extreme bravery and professionalism,” Harrison said, according to the report.

With Post wires