A senior police officer whose team failed to treat a Chinese man’s death as a racist attack is now Scotland's top murder detective, the Sunday Herald can reveal.

Gareth Blair, who said the late Simon San had been the victim of a “fairly minor assault”, has recently been promoted even though an internal investigation criticised the original police probe into the delivery driver’s death.

The temporary promotion has been criticised as unwelcome, with claims made that ethnic minorities need to be confident that senior officers can investigate cases thoroughly.

San died in August 2010 from severe head injuries after a gang of white youths attacked him outside his family’s fast food business at Lochend in Edinburgh.

The 40 year old had been struck by one of the attackers, John Reid, and died after his head hit the ground.

Reid admitted culpable homicide and was locked up for five years, while two others had their sentences for assault cut to 26 and 24 months. Another accused was referred to the Children’s Panel.

Officers for the then Lothian and Borders force mistakenly believed the motive was robbery and ignored the San family’s view that the attack was racially motivated.

An internal inquiry set up by former L&B deputy chief constable Steve Allen confirmed many of the fears about the original police investigation.

The probe found “significant failings” in the inquiry, which had placed little emphasis on the racist language used by the accused.

It found that one of the men convicted had previously been reported for a racist offence and two others had been charged for a separate incident involving a Chinese shopkeeper.

The review concluded that the investigation had failed to recognise the attack on Simon was racist.

Lothian and Borders also referred to San as Vietnamese, rather than being of Chinese origin.

The report noted: “The Force failed to correctly identify the ethnicity of Simon at the outset of the investigation and although there was no intention to do so, this has caused offence.”

Allen chaired a press conference and offered a public apology to the San family, some of whom were in tears:

"There is no doubt that Simon's family have not had the service from my force that we would hope to give any family or any victim of crime.”

"I have apologised privately to the family for that failure and would like to repeat that apology publicly."

The police officer who led the botched inquiry was Blair, who at the time was a detective chief inspector.

On television days after the killing, Blair said: “There is not a lot of violence involved. It is just one punch. Unfortunately, the gentleman fell badly and injured his head. But, really, just a random and fairly minor assault, although the consequences are obviously quite severe.”

He was also quoted in a newspaper saying that “Mr San was in the wrong place at the wrong time.”

This comment attracted direct criticism from Allen at the press conference: "We said that Simon was in the wrong place at the wrong time. He was not. Simon was at his place of work in a city that was his home.

"He was playing his part as an active member of our community, contributing through work to the economic success of this city. Simon was a fellow citizen who was killed tragically and pointlessly."

Blair has worked his way up the ranks and recently got a temporary promotion to chief superintendent.

He is now in charge of the crucial Major Investigation Teams (MIT).

According to the Police Scotland website, MITs are “located throughout Scotland and are responsible for leading the investigation of all murder inquiries and also lead on large-scale and complex criminal investigations”.

A policing source said Blair was "very able".

He also played a key role in the investigation that led to the killer of three year old boy Mikaeel Kular being jailed.

A superintendent, which was Blair’s previous rank, earns between £62,921 and £74,322, while a chief super can pocket between £77,988 and £82,272.

RISE Glasgow Candidate Suki Sangha said: "The appointment of Gareth Blair as head of Major Investigation Teams at Police Scotland is not one we welcome.

"All Scots - but particularly black and ethnic minority Scots - need to be confident that senior Scottish police officers can be trusted to investigate cases thoroughly, and with a clear understanding of racial and ethnic sensitivities.”

However, Aamer Anwar, a solicitor who represented the San family, said: "I understand he is highly regarded amongst his peers. I would hope that the hard lessons learned and mistakes made over the Simon San murder are never repeated again, but he has a right to move on."

John Gillies, the Director of People and Development at Police Scotland, said: “The officer has been promoted following an open, rigorous and competitive senior officer promotion process in which all candidates were required to demonstrate their professional abilities and competencies which were thoroughly tested. T/DCS Blair provided evidence of significant senior operational competence both in terms of strategic issues and investigative capability having been involved in the reform of policing and the creation of the Specialist Crime Division as well as involvement in a number of high-profile inquiries, which in some cases he led as senior investigating officer.”