Image caption The bill would allow evidence to be recorded away from a courtroom

Children and rape victims will no longer have to give evidence in a courtroom under plans unveiled by the Scottish government.

A draft bill would allow vulnerable victims in the most serious cases to give pre-recorded evidence instead.

It follows a call from Scotland's most senior judge to introduce such a change.

The bill also includes a power to extend the new rule to adult witnesses deemed to be vulnerable.

This would include alleged victims of sexual offences, stalking, domestic abuse and human trafficking.

Justice Secretary Michael Matheson said the proposed new law would build on other improvements for victims and witnesses

He said: "This bill is an important step forward, which will mean far fewer vulnerable witnesses have to give evidence in court during criminal trials.

"As young witnesses often need extra support, we have previously made clear that this reform must focus in the first instance on children.

"This represents a significant change to the law and practice, which justice organisations will need to implement in a managed way in order to achieve our aim of ensuring witnesses can give their best evidence, while protecting the rights of the accused."

Victim centred

Initially the system would be introduced for children, but then extended for vulnerable adults such as alleged victims of rape.

The government said it was also working with partners to develop a more "victim-centre"' approach - to streamline points of contact, improve information flow and ensure people feel better-supported through the criminal justice system.

The aim is to reduce the need for victims to have to re-tell their story to several different organisations as they seek help.

The new bill would mean witnesses and victims under 18 would be able to give pre-recorded testimony, usually by the special measure - so-called "evidence by commissioner".

It is something which can be used now in certain cases but has been deployed so seldom it was felt that legislation was required.

Using a commissioner to take pre-recorded evidence means the prosecution, defence and the clerk would still be present but that the vulnerable victim or witness would not have to appear in the courtroom.

The bill will also introduce "ground rules hearings" to discuss the scope of questioning that can be used by the defence - a move expected to be controversial with some advocates.

There would be the opportunity for evidence to be pre-recorded pre-indictment, where appropriate.

Media playback is unsupported on your device Media caption Lord Carloway said with the advent of modern technology there was an opportunity to improve the court system

Earlier this year Lord Carloway told the BBC his "ultimate objective" in reviewing how evidence is gathered was for alleged victims to be able to give filmed statements within 24 hours.

The judge also said their cross-examination should take place well before the trial and away from court.

Some senior defence advocates have warned that a fair trial involved being able to properly test a victim's evidence.

Lord Carloway has suggested Scotland to look at the Barnehus model in Scandinavian countries - where child victims and witnesses give pre-recorded evidence to specially trained police officers in purpose-built centres.

In 2002 Linda Armstrong's 17-year-old daughter Lindsay killed herself after what she described as the humiliating and degrading experience of giving evidence in court against her rapist.

Earlier this year she told the BBC she would welcome a move to remove child witnesses and victims from court.

Mary Glasgow, interim chief executive of Children 1st, said the bill marked another "crucial stage" towards creating a fairer justice system.

"There is clear evidence that taking a child-friendly approach to pre-recording children's evidence can reduce the risk that they experience further harm and improve the quality of their evidence," she said.

"This benefits everybody - including the accused."