New legislation aimed at giving the views of children more weight in the legal system has been approved by the Scottish Parliament.

The Children (Scotland) Bill was passed unanimously in Holyrood and will give children under the age of 12 the right to have meaningful legal input in family disputes.

It is designed to improve the experience of children in court proceedings, particularly in contact and residence cases and brings Scottish law more in line with the UN Convention on the Rights of the Child (UNCRC).

Victims of domestic abuse, and their children, will also get greater protections under the changes, while regulation of contact centres and children's reporters is also increased by the legislation.

Speaking in the chamber, community safety minister Ash Denham said the new law makes "radical changes to make the whole process much more child friendly".

Ms Denham said: "One of my key aims of the Bill was to ensure that the voice of the child is heard and, ultimately, the best interests of the child are of paramount consideration in any contact or residence case.

"The Bill as introduced - and as amended at stage two and today at stage three - furthers the rights of children to participate in proceedings.

"The presumption that our child age 12 or over is mature enough to give their views, has been replaced with a presumption that all children are capable of giving their views, subject to extremely limited exceptions.

"In addition, under the Bill the courts will be required to provide children with an explanation of their decisions."

She added: "The Bill also makes important steps forward for looked after children and their brothers and sisters, and this Bill requires local authorities to promote contact between a child and their brothers and sisters just as they must promote contact with parents, if this is possible."

Ms Denham said the implementation of the changes will take place "as quickly as possible", although some aspects - such as changes to children's reporters - will take longer as they "require significant consultation".

"Our work on improving the family courts is far from complete, there is much left to do and we will do that as quickly as we can in the current circumstances," she said.

The Scottish Conservatives' justice spokesman Liam Kerr backed the Bill, saying it was the product of collaboration and working across the parties.

But by doing this he said the Parliament had come up with a "finished product we can all be proud of".

Labour's James Kelly said his party too supported the legislation, saying it introduced "key reforms".

He described it as being "strong legislation", adding that "hopefully it will serve the interests of children well".