It was Tuesday, April 11, 1989, and the toilet attendant was locking up for the night when he made a grim discovery.

In the stairwell of the convenience where he worked in Glasgow's St Vincent Place was the bloodstained body of a man.

Supermarket manager Peter Smith was slumped against the white tiles at the bottom of the steps leading from the city-centre toilet entrance.

The victim was unconscious and there was blood on his clothes.

READ MORE: Glasgow Crime Stories: The story of Maurice Swanson and how pardon after bank robbery

Glasgow Times:

City centre toilets

Within a few minutes, an ambulance had been called and a passing police car flagged down.

Peter, a gay man, was bleeding heavily from a deep single stab wound to his chest.

He was rushed to nearby Glasgow Royal Infirmary but died around two weeks later.

The public toilet block in St Vincent Place was well known in the male gay community as a pick-up point.

Young male sex workers - known then as rent boys - cruised the area at night looking for custom.

There were also ruthless extortion gangs who prayed on both the young men and their equally vulnerable clients.

Peter, a former soldier who lived in the mining village of Plean, Stirlingshire, had been stabbed around 11:15 pm that night.

READ MORE: Glasgow crime stories: Lawyer recalls representing Terry Butcher and Frank McAvennie after pitch rammy

Glasgow Times:

A trail of blood from nearby North Court Lane suggested he had probably been attacked there before staggering towards the toilets.

Few knew that Peter was gay or that he had previously been assaulted in the city centre on account of his sexuality.

Suspicion quickly fell on a 25-year-old drifter and petty criminal Stuart Gair.

Glasgow Times:

The morning after the stabbing he had been arrested for an unrelated minor offence in the city's West End where he lived in a hostel.

Gair became the prime suspect for the murder investigation team after detectives discovered he also hailed from Plean.

Surely it was too much of a coincidence, they thought.

At Gair's trial at the High Court in Glasgow in August later that year three witnesses testified he was in North Court Lane at the time of the murder.

Glasgow Times:

Forensic evidence tied Gair to the knife which had supposedly been used to murder Peter.

However, his fate was sealed by the testimony of a fourth man who had also been charged with the murder.

In return for having the charges dropped he became a witness for the prosecution.

He told the jury he had seen Gair with a knife in North Court Lane around the time of the murder.

Glasgow Times:

Gair was found guilty by a majority verdict and sentenced to life.

He claimed that he was the victim of a miscarriage of justice, but no one at that time was listening.

Eight years later newly retired Detective Inspector Bryan McLaughlin was approached by Stuart Gair's solicitor.

He was asked now that he had left the police if he wanted to take on some private work.

Bryan had never heard of Gair and had assumed he was likely to be guilty.

However since his conviction two of the prosecution witnesses - both male sex workers - had recanted their evidence claiming they had been pressurised by police into incriminating Gair.

Bryan was wary of investigating the case given that it involved former colleague some of whom he knew personally.

However, it was a chance to flex his investigative skills which he had honed during a distinquished 32 year police career.

He later said: "I took the view that if lawyers can change sides from prosecution to defence then so could I"

Over the next 18 months Bryan interviewed most of the original witnesses.

Crucial to the case was a was a 40-year-old gay man who had been in the St Vincent Place area at the time of the murder and who gave evidence against Gair. He was a respectable law-abiding citizen and churchgoer Bryan knew that if he agreed to change his original evidence then it would carry more weight with the appeal judges.

The former detective caught him one Sunday as he was leaving the church.

As they sat in his car he admitted he had lied at Gair's trial about seeing him at the crime scene.

Glasgow Times:

He claimed the police had told him to pick out Gair, who he had never seen before, at an identity parade.

The man also claimed a detective had said his family would be told he was gay if he ever changed his statement.

Bryan then tracked down an alibi witness who said Gair was with him at the time of the murder watching television in a hostel in Belhaven Terrace in the city's west end. For some reason he hadn't been called as a witness.

A new report by Dr Bill Hunt, a leading pathologist, describe the forensic evidence against as seriously flawed.

Glasgow Times:

Gair had also been befriended by Dr Jim MacGregor, an Alloa GP and part-time prison medical officer.

The doctor helped mobilise his campaign after studying the case papers.

Scottish actor and film star Peter Mullan also joined the glamour for his conviction to be overturned.

By 1999 the Scottish Criminal Cases Review Commission had been set up to investigate miscarriages of justice.

Gair's was the first case referred to them.

Glasgow Times:

As a result he was freed on appeal in 2000 after serving 11 years.

However three judge rejected the appeal in 2004.

They said the retractions by the murder trial witnesses of their original evidence was not credible.

The judges also suggested they could have been pressured by Gair's campaigners to change their stories.

However in July the following year the conviction was finally quashed after new evidence was presented which met the threshold for an appeal.

This time his legal team were able to prove that the defence had not been given access to vital witness statements prior to the trial which might have allowed them to prove their clients innocence.

A jubiliant Gair speaking afterwards said:"I feel fantastic, obviously it'll take a while to settle in, but already I feel the weight lifted by not having the life sentence for murder against my name."

However as he looked forward to a life of freedom he tragically died from a heart attack at the age of 44 in Edinburgh the following year.

Ironically the paramedic team which was called to his home were being filmed by investigative journalist Donal McIntyre for a programme about the emergency services.

Before he died Gair was able to tell MacIntyre, who had not been aware of the case, about his fight for justice At the time John McManus, of the Miscarriages of Justice Organisation (Mojo), said the stress of being wrongfully locked up had killed Mr Gair.

He added: "He was released without any support whatsoever. People have no idea of the level of stress this puts people under.

"Like all of those who have been wrongfully convicted, he was suffering from severe post traumatic stress and he hadn't even received his financial compensation.

"There has to be better support put in place to help people in these circumstances."

Gair also didn't get the chance to enjoy the compensation he had been awarded, said to be upwards of £1million. Instead, it went to his 19-year-old daughter.

Over the years the case has been judged Scotland's worst ever miscarriage of justice.

So who killed Peter Smith?

Bryan believes that he was the victim of an extortion gang who would target gay men, who used rent boys, and then threatened them with violence and exposure if they did not hand over money.

Such a gang was operating in the city centre at the time.

In his 2012 biography 'Crimestopper' Bryan said: "I took some comfort from the fact that I had done my best to help him win a few months of life with his name cleared.

"It's likely Peter Smith was a victim of extortion and that's what went wrong that night, leading to his stabbing.

"I found a highly organised gang was operating in the area where the killing took place.

"I am convinced that people who worked in the area as rent boys at that time know the identity of the real killer."

Glasgow Times:

In the book, Bryan also expresses reservations about the original police investigation.

He added: "It was distasteful to think that some members of Strathclyde Police had been accused of working to get Stuart Gair, an innocent man, banged up.

"It wasn't the police service that I recognised."