A former detective has won the latest round in her £750,000 damages action against the Scottish Executive.
Shirley McKie is suing for compensation
A judge at the Court of Session refused to dismiss the case brought by Shirley McKie, who alleges she was the subject of a malicious prosecution.
Ms McKie was cleared of perjury after maintaining that a fingerprint found at the home of a dead woman was not hers.
Lord Wheatley rejected the government's claim that records office staff should be given immunity from prosecution.
Miss McKie was a detective constable when Marion Ross, 51, was found murdered at her home in Kilmarnock in January 1997.
David Asbury, 27, from Kilbirnie, was later jailed for life for her murder, but saw his conviction quashed last year.
During the investigation, fingerprints were found on a door frame at the victim's home.
A report by the Scottish Criminal Records Office (SCRO) said that one of the prints belonged to Miss McKie.
During Asbury's trial, she denied that the print was hers. She was arrested later and charged with perjury but was acquitted after a trial in 1999.
In her action, she maintains that certain SCRO staff were negligent in making a wrong identification of the print.
Miss McKie, 39, from Troon, says that despite some of their colleagues refusing to confirm there was a match between the print on the frame and hers, they maliciously maintained their original position.
The executive had asked the court to dismiss her action, claiming that SCRO staff enjoyed an absolute immunity in the course of their role as witnesses in a criminal prosecution.
In a written decision, Lord Wheatley said that legal authorities showed such a protection was not confined to the witness box.
But he added: "There is a major exception to the protection afforded by absolute immunity.
"It is not available where the cause of the action is one of malicious prosecution. Miss McKie says that this is the position in the present case.
The fingerprinting system has been cast into doubt
"Immunity cannot be available in a prosecution which is based on an abuse of process, even in respect of what is done in preparation for a court case, or for evidence arising out of that abuse of process given in court."
A date for a hearing of evidence in the case has still to be fixed.
In a statement, the Scottish Executive said the opinion would be carefully studied and the position considered.
No further comment could be made because the matter is still subject to the legal process.
But Miss McKie's father Iain said: "This is a tremendous Christmas present for Shirley and the family.
"The executive have been rebutted on all their arguments and we are now ready to have the full case heard in court at some stage next year.
"All those involved are going to have to come out from behind closed doors and tell the truth, which is what we have wanted all along."
Former Scottish National Party MSP Michael Russell, who has campaigned in and outside the Scottish Parliament on behalf of the McKies, said he hoped the executive realised it could not win the case.
"It is time the first minister stepped in, insisted that the executive apologise and accept the inevitable," he stated.
The controversy led to an overhaul of the fingerprint bureau amid growing public disquiet.