A Pennsylvania police officer will not face charges for accidentally shooting a suspect in the stomach inside a police station last month, the district attorney announced Friday.

Bucks County District Attorney Matthew Weintraub declined to press charges against a New Hope, Pennsylvania, police officer who apparently meant to pull out his Taser, but instead drew his gun and shot a suspect inside an interview room. The suspect, Brian Riling, was rushed to the hospital in critical condition but survived.

"This was an honest mistake, with an unfortunate consequence," Weintraub told Philadelphia ABC station WPVI.

Weintraub added, "The conduct was neither justified nor criminal, but excused because the officer honestly believed that he was using his Taser when he shot Mr. Riling in the stomach."

Surveillance video from inside the police department shows Riling drop something "consistent with a drug baggie," according to police, on the ground while adjusting his belt and jeans. He steps on the baggie and then gets into a scuffle with two officers when they try to remove his foot from on top of the object.

Riling is described as a "fit" 6-foot-4, 240-pound construction worker in the district attorney's release.

One of the officers shouts "Taser!" and reaches to his right hip, but instead draws his service weapon and fires one shot into Riling's midsection. Riling collapses on the ground, holding his stomach, as the two officers immediately leave the cramped interrogation room.

Riling initially isn't clear what happened, shouting at the officer, "Was that a gun? You shot me with a gun?"

Weintraub wrote that the officer -- who is not being named as charges were not filed -- would have been justified in using his stun gun.

According to section 304 of the Pennsylvania Crimes Code, "a person has a defense to a criminal charge if he makes a mistake as a matter of fact for which there is a reasonable explanation or excuse."

Riling had been taken into custody for charges of retaliation against a victim and simple assault, according to police.

The officer retired on April 10 and was lauded by the district attorney.

"What I can say, to be fair, is the numbers of letters of support over his lengthy career far outweighed the very minor infractions he may have had in his historical past," Weintraub told WPVI.

The district attorney notes the officer was wearing his stun gun in the wrong spot, and not in accordance with department policy.

The New Hope Police Department released a statement, saying, "The Department thanks District Attorney Weintraub and the members of his office for their thorough investigation and report. The Police Department has no further information to release, and no further comment on this matter."

Riling is due in court for a preliminary hearing on his charges Monday, according to the Bucks County Courier Times.

ABC News' Matt Foster contributed to this report.