A 69-year-old man has avoided serving jail time after his defence team used ‘gay panic’ as the reason for why he killed his friend.

James Miller – a former police officer from Austin, Texas – struck up a friendship with Daniel Spencer when they decided to play guitar together regularly at a local bar.

However, one evening Miller alleges that Spencer made a sexual advance towards him.

After playing at a bar, Spencer allegedly reached in for a kiss, but Miller responded with “Hold it, I’m not a gay person.”

A court heard that Spencer allegedly branded a glass and became aggressive after being turned down, reports NBC.

“He had height advantage over me, arm length over me, youth over me,” Miller told the jury. “I felt he was going to hurt me.”

Miller then pulled out a knife, stabbed and killed Spencer, before handing himself into the authorities.

Prosecutors argued that because Spencer didn’t announce any intent to physically harm Miller, the fact that fatal force as self-defence was used was “ludicrous”.

They added that Miller didn’t have “so much as a scratch on him” with little to no sign of a struggle.

Miller was convicted of criminally negligent homicide.

The jury decided to give him 10 years probation, but Judge Brad Urrutia added on 100 hours of community service, $11,000 in restitution to Spencer’s family, and six months jail time.

‘Gay panic’ defence is rarely used successfully, but remains legal in most states across the US.

In fact, the use of the defence has only been banned in California and Illinois.

The American Bar Association has called upon all states to eliminate the defence from ever being used.