Donald Findlay, QC, said detectives did not properly secure the area in Greenock where her body was discovered in June 1986.
At the High Court in Edinburgh, Mr Findlay said the way officers acted caused evidence that was collected at the scene to become contaminated.
Mr Findlay said DNA evidence against his client John Docherty was unreliable and that the jury could not trust it when it came to consider its verdict.
He also said he believed some police officers who had given evidence at the trial had told lies about what happened in the early stages of the investigation.
Mr Findlay was speaking to the jury on the 50th day of proceedings against 49-year-old Docherty, of Dunoon, Argyll, who denies murdering Elaine on June 2 1986.
The advocate spent the entire court day delivering his closing speech. During his address, Mr Findlay said that when police were collecting forensic evidence from Elaine's body, officers did not wear protective clothing.
He said this allowed DNA evidence to become contaminated and that the jury could not trust this evidence to prove John Docherty's guilt.
Speaking about the policemen who attended the death scene, Mr Findlay said: "That group of officers virtually destroyed the crime scene.
"They did not take steps to ensure that this corruption was minimised. It was a shambles from the word go."
Mr Findlay told the jury he believed evidence also showed that some of the officers who gave evidence at the trial had not told the truth.
The trial continues on Monday.