Scotland's top prosecutor yesterday rebuffed unprecedented public criticism from the country's most senior judge and made clear she would not back away from explaining the background to controversial court cases in future.

A remarkable exchange of letters between Lord Hamilton, the Lord Justice General, and Lord Advocate Elish Angiolini emerged in the wake of her statement to parliament on the collapse of the World's End murder trial.

The case against Angus Sinclair folded at the High Court in Edinburgh last month when Lord Clarke ruled there was not enough evidence for the jury to reach a verdict.

In her comments to MSPs two weeks ago, Ms Angiolini insisted that there had been a strong enough case to let the jury decide whether to convict double killer Sinclair for the 1977 murders of teenagers Christine Eadie and Helen Scott.

Lord Hamilton was on holiday when she spoke, but issued a three-page letter yesterday. Written with the full agreement of Lord Gill, Scotland's second most senior judge, he called Ms Angiolini's statement "inappropriate" and said she had not shown "requisite respect" to the judiciary.

He also claimed that it could have been illegal under a new law being considered because this would give her a statutory duty to uphold the independence of the judiciary.

Within minutes of Lord Hamilton's letter being made public, the Lord Advocate responded robustly, stating that she had chosen her words "with great care" and insisting: "I do not think I could have gone further expressly to afford greater respect for the final decision of the trial judge in the circumstances."

Asked whether the Lord Advocate's rejection of the criticism meant she would be prepared to do the same again, a Crown Office spokesman said: "Absolutely."

The open spat between the country's two most senior legal figures prompted the Conservatives to claim it proved the need for the head of the prosecution service to be removed completely from the political sphere.

Tory justice spokesman Bill Aitken said: "There needs to be a complete separation of powers. The situation whereby Scotland's premier judge and chief prosecutor are in conflict is unprecedented and extremely unfortunate. The Lord Advocate was quite correct in coming to the parliament to make a statement following the Sinclair case, but there was no doubt that some of this statement could have been construed as criticising the trial judge's decision and that is what has prompted Lord Hamilton's understandable concern."

Margaret Smith, of the Liberal Democrats, added: "A public disagreement of this nature between the Lord Advocate and Scotland's most senior judge is unprecedented. Many people will be concerned at any claim that the independence of the judiciary is under threat."

Alex Salmond came to Ms Angiolini's defence at First Minister's questions. He said: "Given the public interest and concern in this case, no member of this parliament and I think very few people in Scotland would expect anything less. Inevitably in giving that statement and then answering questions, the Lord Advocate is going to put forward the Crown point of view - the prosecution service's point of view, as indeed was done in open court."

He added: "That is surely a law officer responding to public concern, subjecting herself to parliamentary scrutiny."

For Labour, Pauline McNeill said: "We respect the independence of the judiciary. However the World's End case has raised an important legal point. To tackle this we should consider whether the Crown should have the right of appeal against the decision of a judge."