A pet dog has undergone gender reassignment in a rare operation after vets discovered she was a hermaphrodite.Molly, a Jack Russell who was born with male and female parts, has made a complete recovery after undergoing the rare gender reassignment surgery.Mary and Frank Finlay first took their puppy Molly to the vet when they noticed her unusual toileting behaviour. Ross Allan, a vet based in Glasgow, discovered she was intersex, with elements of both male and female external genitalia.This was causing her “significant” discomfort and abrasions, so she underwent a “complex” operation to improve her quality of life.Mr Allan said Molly, now around 18 months old, has made a complete recovery after the surgery last June.Mr Finlay told BBC Scotland’s Kaye Adams Programme: “We got Molly in November 2015 and noticed that around the house she would squat to do her pees but outside she would lift her leg.”I mentioned this early on in 2016 to one of Ross’s colleagues and they came up with the probability that she was a hermaphrodite, both sexes.”They did MRI scans and X-rays, and eventually she was operated on in 2016. We still call her Molly.” Want the best of The Telegraph direct to your email and WhatsApp? Sign up to our free twice-daily Front Page newsletter and new audio briefings. The complex surgical procedure involved removing her pseudo male sexual organ and forming a functional urethral opening where the female genitalia would normally be found.Mr Allan, who works at the Pets’n’Vets Family’s Roundhouse Veterinary Hospital in Glasgow, said: “Molly was what is defined medically as a male pseudo hermaphrodite, or more commonly ‘intersex’.”Her particular anatomy meant that whilst Molly appeared to be a female, closer examination revealed elements of both male and female external genitalia, and unfortunately this was leading to significant genital discomfort.”If left untreated, this risked her developing a long-term and debilitating condition.”We decided that the very best solution for Molly was to proceed with definitive surgery to create an anatomical situation which would avoid ongoing issues or discomfort.”The surgery was a great success and Molly is much more comfortable and happier as a result.”Intersexism is rare in pets and some cases will not require any treatment at all.”In Molly’s case, it was a painful condition which was causing problems and surgery was an important step to ensure she was able to go on to live a pain-free life.” Intersex Jack Russell MollyCredit:PA Jack Russell Molly with her owners Mary and Frank Finlay at home in GlasgowCredit:SWNS Mrs Finlay added: “We’ve seen no change in her behaviour. She’s still the same wee Molly and we wouldn’t be without her, she’s too precious.”During the surgical procedure, Mr Allan found Molly’s internal sexual organs were that of a male, with testicles in the place of ovaries within her abdomen.