An officer with the Council Bluffs (NE) Police Department has been cleared by the Pottawattamie County District attorney in the shooting of a man in early May.

According to the Omaha World-Herald, the officer acted lawfully and was defending himself when he shot a man who fired a handgun at him outside a convenience store, the has found.

Officer Mike Roberts encountered the subject—identified as 34-year-old of Jimmy Carr—who opened fire on the officer. Officer Roberts retuned fire, striking the gunman in the leg.

The gunman was transported to a nearby hospital for treatment, where he was subsequently charged  with being a felon in possession of a firearm, first-degree robbery and attempted murder of a law enforcement officer. A judge ordered Carr to be held on $2 million cash bail at the Pottawattamie County Jail.