Detectives investigating the murder of Jodi Jones "cast fairness aside", it has been claimed at the Court of Criminal Appeal in Edinburgh.
Luke Mitchell was convicted of murder in 2005
Donald Findlay, QC, acting for Luke Mitchell, who was given life for her murder, said police had "flaunted" the guidelines, whether deliberate or not.
He was particularly critical of the ID process in which a trial witness was shown a number of photographs.
He said the one of Mitchell, now 19, clearly stood out.
Mitchell, who was ordered to serve at least 20 years before being considered for parole, is appealing against his conviction and the length of his sentence.
Mr Findlay told the court that no proper explanation was ever given for not putting Mitchell in a proper ID parade - as recommended in official guidelines.
The lawyer said that if this had happened a solicitor could have objected to the "stand-ins".
"It is difficult looking at this, in my submission, to see how police could have more ignored, contravened, torn up and thrown away those guidelines," he said.
Mr Findlay singled out Det Supt Craig Dobbie, who led the murder investigation.
Mr Dobbie told Mitchell's trial that he had not known of ID parades for persons who were only suspects.
"One had to raise ones eyes at the veracity of the statement of a senior officer. These were guidelines he was duty-bound to know about, for a man of his rank," Mr Findlay said.
He suggested that the police were "in haste" to get the witness, Andrina Bryson, to identify Mitchell.
"That explains the combination of high-handed and cack-handed approach by police in this matter," he said.
Mr Findlay pointed out that one of the 11 photos was a child much younger that Mitchell and no-one else had a similar haircut. The background in the Mitchell photo was also much lighter than the others.
Mr Findlay said it threw Mrs Bryson's claim that Mitchell was the youth she saw into question. She also failed to pick him out in court.
The body of Jodi Jones was found on a footpath near her home
The appeal judges also heard how Mitchell's attempt to help Jodi's worried family find her on the night of 30 June, 2003, had been given a sinister twist it did not deserve.
The trial heard how grandmother Alice Walker, then 67, Jodi's sister Janine, 19, and Janine's fiance, barman Steven Kelly, 21, mounted a torchlight search of the Roan's Dyke path and met up with Mitchell and his dog.
Mitchell was first to look over a gap in the wall - near to where Jodi, 14, lay.
Prosecutors claimed he had led the others to the body because he knew where it was.
He questioned why Mitchell should want to lead others to the body if he were the killer.
The appeal court earlier heard how Mitchell was the subject of "an intensity" of press coverage before his trial.
It was told how his 16th birthday and the announcement of his exam results kept his name in the press months after Jodi's death.
It was claimed the newspaper reports were published even when a court order was issued to restrict reporting.
Mr Findlay has argued that Mitchell suffered a miscarriage of justice because his murder trial was held in Edinburgh, where widespread "hostile" media coverage about him would have had the greatest impact.
The appeal before Scotland's top judge, Lord Hamilton - sitting with Lords Osborne and Kingarth - continues.
They are expected to issue a decision in writing at a later date.