The following correction was printed in the Guardian's Corrections and clarifications column, Monday September 24 2007 We were wrong to describe Margo MacDonald as a senior nationalist MSP. She represents Lothians as an independent MSP.

The trial of a convicted murderer accused of the most notorious unsolved killings in Scotland collapsed dramatically yesterday after a judge ruled that the case against him was too weak. Angus Sinclair had been accused of the so-called "World's End murders" of Christine Eadie and Helen Scott in October 1977. The two 17-year-olds had disappeared from the World's End pub in October 1977. Their bodies were found the next day, raped, battered and strangled.

Eadie and Scott, childhood friends from the Firhill area of Edinburgh, had been out drinking with other friends in the city's Old Town on Saturday October 15 1977 when they vanished after leaving the pub on the Royal Mile with two men. Their beaten, raped and naked bodies were found six miles apart on open ground in East Lothian. Both women had been bound and gagged with their underwear and clothing, then strangled with twine and their own clothing.

The police claimed to have uncovered clear DNA evidence from semen stains found on Scott's coat linking Sinclair and his now deceased brother-in-law, Gordon Hamilton, to the killings.

But yesterday, after hearing eight days of evidence against Sinclair, the trial judge, Lord Clarke, ruled that the prosecution had failed to prove its case and dismissed the jury. The evidence that Sinclair had played any role in their deaths was "neutral" at the very best, he said. Outside court, Helen Scott's father, Morain Scott, said he was "absolutely shattered" by the ruling. "Thirty years of trying to get a conclusion ... I promised I would stick by this and get justice, which, honestly, I don't think I got today," he said.

Detectives are privately furious that the case collapsed, particularly after a key piece of evidence, a piece of twine which allegedly had traces of DNA on it, was withdrawn last Wednesday when Sinclair's defence advocate, Edgar Prais QC, discovered a key expert witness had not seen all the relevant evidence.

The jury at the high court in Edinburgh heard that after the original inquiry was wound down in 1978, Lothian and Borders police put the main pieces of evidence into storage, including Scott's distinctive overcoat, and the ligatures and fibres found on their clothes. Between 1988 and 2006 - as technological advances led to more sophisticated DNA testing methods - scientists carried out a series of DNA tests on semen stains from Scott's overcoat and swabs from both women.

In 2006, officers believed they had made a crucial breakthrough. Detectives in London investigating the case of Adam, the African boy whose torso was found in the Thames, suggested they use an extremely sophisticated test for "ancestral" DNA. The last stained area of Scott's coat was tested, and on it they found Sinclair's genetic fingerprint, stored after his conviction in 2001 for the murder of Mary Gallacher, a 17-year-old who was assaulted, strangled and murdered in 1979. Detectives then traced Sinclair's closest friend at the time, his brother-in-law Gordon Hamilton, who had died in 1996. Genetic tests on Hamilton's close relatives found a very close match, which was confirmed when they tested some foam coving used to redecorate his former girlfriend's flat in Glasgow.

When his trial opened two weeks ago, Sinclair admitted having sex with Scott and Eadie but claimed it had been consensual, and accused his brother-in-law of committing the murders. Last Friday, after the prosecution case closed earlier than expected, Mr Prais asked the judge to throw the case out because of insufficient evidence. There was "absolutely no evidence" from the crown that either woman had been abducted, raped or robbed, as the charges against Sinclair claimed, or that Sinclair had done anything other than have intercourse with them, he said. Nor were there any eyewitnesses or proof that Sinclair had been present when they died. The judge agreed.

Lothian and Borders police insisted it had given the prosecution authorities a "thorough and detailed case" to take to trial. "We have no plans to reopen the investigation," it said.

MSPs from all parties were highly critical of the Crown Office's handling of the case. An independent MSP, Margo MacDonald, said the acquittal raised "very disturbing questions about the way in which the prosecution office worked".

Backstory

The unsolved murders of Christine Eadie and Helen Scott nearly 30 years ago paralysed Edinburgh, and have haunted the detectives who investigated them. "It stopped Edinburgh in its tracks," said Tom Woods, who recently retired as deputy chief constable of Lothian and Borders police, and played a key role in reopening the case. "Because of the nature of the victims - complete innocents - and because of the nature of their death, and because there were two of them, it was a shocking, shocking crime. This sort of thing didn't happen here." Edinburgh crime writer Ian Rankin, speaking on BBC4, remembered the murders as a student: "The irony [that] the pub was called the World's End sent a shiver up the spine, it really did."

"It was left open as a landmark case because it had blighted our reputation," said one detective involved in the case. "We'd a duty to the girls and their families. We wanted to make sure we'd never missed anything."