A Miami-Dade judge has determined that a man charged and jailed for murdering his girlfriend’s alleged rapist acted in self-defense.

Miami-Dade Circuit Judge Teresa Mary Pooler threw out murder charges against Pete Campbell, who is also known as DJ Feddy, under Florida’s controversial stand-your-ground law. The stand-your-ground law allows a citizen to use deadly force if they are being threatened with bodily harm. Campbell killed John King, 42, who was accused of raping Campbell’s then-girlfriend, reported The Miami Herald.

READ MORE: White Florida man citing ‘Stand Your Ground’ law convicted of murdering Black man

Campbell, 30, was deejaying at Bunny’s West Indian restaurant in Miami Gardens on July 3, 2015, when he was accosted by King and his friends in a restaurant hallway. Campbell told police he was able to tussle a gun away from one of King’s friends and he fired a fatal shot at King. After the shooting, Campbell fled the scene, but was arrested by Miami Gardens police and spent several years behind bars before he was freed by Pooler.

King reportedly came to Bunny’s looking for Campbell. Apparently, word got out that Campbell and his girlfriend had repeatedly tried to get the police to pursue King for the girlfriend’s rape.

During a stand-your-ground hearing, Campbell’s attorneys said King had raped Campbell’s girlfriend at gunpoint six months before the shooting. “She reported the case to the police but nothing was done about it,” Judge Pooler wrote in her order.

“This was the most transparent self-defense case of justifiable use of deadly force I’ve seen,” Defense Attorney, Jonathan Jordan, said in the hearing, according to The Miami Herald. “Credit to Judge Pooler who followed the law the Legislature has set out. The ‘victim’ sought out Pete at his place of employment; Pete never asked for this but he was put into a situation where he had no choice but to defend himself or become a victim himself.”

READ MORE: Star Georgia women’s college basketball student charged with murder

Pooler agreed that Campbell acted in self-defense.

“(Campbell) knew King’s reputation in the community for violence,” the judge wrote in her court order, reported The Herald. “He also believed that King was out to get him. …. Based on all that ensued prior, his fear was reasonable that King came to Bunny’s with the intent to kill or do great bodily harm.”

“Mr. Campbell testified and his testimony was very compelling and credible,” Pooler added.