Two local police officers were cleared of any wrongdoing in the shooting death of a Hudson Valley man.

On Wednesday, an Orange County grand jury declined to file charges against two City of Middletown police officers who fatally shot 53-year-old Richard Dinneny in July.

An independent investigation by the Orange County District Attorney’s Office also found that police were justified in the use of deadly physical force.

In July, officials described the incident as “suicide by cop.” Dinneny showed up at his ex-girlfriend’s house on Overlook Drive in Middletown drunk and threatened to kill her. The woman then called 911.

Dinneny then also called 911 and told the dispatcher that he forced his way into the home. Dinneny added that he wanted to die  and would kill any police who responded.

When Middletown police arrived, they found Dinneny outside the home with a weapon. Police ordered him to drop the gun several times.

When he pointed the weapon at police, two officers fired five shots, striking Dinneny three times. Both officers have over 10 years of service, officials say.

Dinneny was taken to a hospital where he died from his injuries. The weapon that police say resembled a semiautomatic pistol turned out to be a black pellet gun.

Dinneny was under an order of protection that prohibited him from being in the presence of his ex-girlfriend or from entering the residence on Overlook Place.

He previously served nearly 20 years in prison for a 1985 manslaughter conviction.