A judge in northwest Indiana has granted bail to a 37-year-old man charged with murder after a police officer testified earlier this month that the fatal shooting was likely accidental.

The (Northwest Indiana) Times reports that Edgar Del Real was released from jail Thursday after a Lake County judge set bond at $5,000 cash.

Del Real, of Hammond, had been behind bars for seven months since his arrest for fatally shooting 37-year-old Steven Robledo as Del Real and Robledo confronted a man in Whiting. They believed he’d mistreated a young female.

A shotgun that man was holding went off as Del Real tried to wrestle it away, killing Robledo. An officer testified on April 3 that there’s no reason to think the shooting was anything but accidental.