Top judges have warned MSPs that proposals to compel judges to dispel "ill-founded preconceptions" about rape victims could confuse jurors into thinking judges are in favour of accusers and prosecutors.

The Scottish Government wants judges to tell juries "there may be good reasons" why rape victims delay going to police and that it "may not necessarily indicate that an allegation is false" if there was no physical force from the accused or resistance from the accuser.

Lord Justice Clerk Colin Carloway said this would cast judges in "the mantle of the prosecution" by requiring them to state facts "designed to be in favour of the complainer in the case".

Sheriff Gordon Liddle, vice president of the Sheriffs' Association, said there is a danger juries could be influenced by "indicators from judges".

In a submission to Holyrood's Justice Committee, Lord Carloway said: "What is proposed is that the judge should essentially take on the mantle of the prosecution in making statements of fact dressed up as law."

Elaborating on the submission at committee, he said: "The Act would require the judge to state facts as law.

"In other words, these are facts which as designed to be in favour of the complainer in the case.

"That traditionally has been the mantle of the prosecutor to argue these matters before the jury, for the defence to make such submissions as they wish to do in response, and for the judge to act as the arbiter between them."

Sheriff Liddle said: "There are dangers in legislating for something that has to go in a jury speech."

He said any mandatory statement would have to be "diluted" to ensure the jury knows they remain the "masters of the facts".

But he added: "You could then confuse a jury because they would wonder why they are being told one thing and then told another thing.

"There is also the risk that, although you stress to a jury that something said by the judge need not be taken into account, they're looking for indicators from judges.

"We have to go out of our way to avoid a jury being influenced in any way whatsoever by what we might say."

The proposal for jury direction is contained in the Abusive Behaviour and Sexual Harm Bill currently under consideration at Holyrood.