A man died three days after he was turned away from a doctor's surgery, an investigation found.

The man - who had just been released from prison - required medication to control his withdrawal from methadone and had also complained of chest pains.

However, he was told he wasn't registered with the practice and died of pneumonia days later.

An investigation said it was probable that the surgery had discriminated against him on health grounds.

His mother had registered him with the practice, which is in the Greater Glasgow area, and arranged for him to have an appointment on the day of his release.

However it emerged that the practice had been told to cancel his registration by NHS Greater Glasgow and Clyde. They said he couldn't register until he was released from prison.

Staff did not let his mother know and an investigation found "there was no reason" why he couldn't have registered that day.

Public Services Ombudsman Jim Martin upheld a complaint that the man, referred to as Mr B, was "unreasonably refused access to a GP".

He said: "Mr B should have been seen and assessed by a GP at the practice.

"It is clear that Mr B made her aware that he wanted to see a GP about medication and he has also been described as having lung pain.

"In the advisor's view, the decision not to assess Mr B's needs properly was arguably a form of discrimination on health grounds."

A spokeswoman for NHSGGC said: "We are sorry for the distress caused to this lady and offer our condolences for her loss.

"We have already put in place support for the practice to help them review their administration of complaints handling.

"We will continue working with the practice to ensure that the other recommendations made are fully addressed.

"An Enhanced Significant Event Analysis is being carried out with support from NHS Education for Scotland (NES)."