A man who removed another man's testicle in a hotel room as part of a "backyard" gender reassignment operation has been spared jail. Aircraft engineer Allan George Matthews was placed on a five-year good behaviour bond when he appeared on 27 October at Port Macquarie District Court, New South Wales, Australia.

The 58-year-old had earlier pleaded guilty to a series of charges including causing reckless grievous bodily harm.

Earlier the court heard that an unnamed 52-year-old man had met Matthews in a Port Macquarie hotel room in May 2016 after the victim had posted an ad on social media requesting assistance with a medical issue.

The man was looking for help with gender reassignment surgery to become a woman. Matthews said he was medically trained and had an extensive medical kit and was "happy to help to assist with your pathway," reported ABC News.

It is understood the younger man was forced into a "backyard operation" because he could not afford the treatment recommended by a urologist he had previously consulted, said Australia's Daily Telegraph. Matthews then went on to remove the victim's left testicle in a procedure in the hotel.

But the incident sparked a police investigation after the younger man went to a local hospital a week later because the wound had become infected, reported PerthNow.

Matthews was arrested and charged in June 2016, and admitted he did not have any medical qualifications. The engineer did have first aid certificates and some veterinary experience, adding he felt sorry for the younger man.

Judge Clive Jeffreys acknowledged that Matthews and did not seek or receive any payment for the procedure, adding that the well-respected aircraft engineer appeared genuinely motivated to help with the gender reassignment.

The court also noted that the case has received a great deal of media attention since last year, during which time Matthews has found it difficult to find engineering work. But Judge Jeffreys added that Matthews had exercised poor judgment and was very naive.

Matthews was also convicted of removing tissue from the body of another without consent or authority, as well as possessing and attempting to prescribe a restricted substance.