Scotland’s minimum age of criminal responsibility will be raised to 12 years, in line with UN standards, after the current minimum age of eight, the lowest in Europe, was labelled a “national embarrassment”.

Mark McDonald, minister for childcare and early years, announced on Thursday afternoon that the Scottish government would bring forward legislation to raise the age by four years, calling the case for it “clear and compelling”.

In a statement to Holyrood, McDonald told MSPs: “Having the lowest minimum age of criminal responsibility in Europe does not match with our progressive approach to youth justice and ambitions to give children the best start in life.”

A recent consultation with police, prosecutors and victims’ groups found that 95% supported an increase to the age of 12 or above.

In 2010, the Scottish government raised the age of criminal prosecution to 12, assuring that no one under that age could be prosecuted or sentenced in the criminal courts but would be dealt with through children’s hearings. However, those outcomes would still be added to children’s criminal records.

McDonald said: “Raising the age of criminal responsibility will mean people no longer face potentially damaging and life-altering consequences, such as a criminal record, for events that took place when they were a young child.”

He added that he recognised the need for safeguards in exceptional cases, and that police would still have powers to investigate serious offences committed by children under 12s.

The minimum age of criminal responsibility in England and Wales is 10. The UN committee on the rights of the child has stated that setting the age of criminal responsibility below 12 is considered “not to be internationally acceptable”.

Liam McArthur MSP, the Scottish Liberal Democrat justice spokesperson, welcomed the decision. His predecessor in the role Alison McInnes advocated the rise, but her attempts to alter the law by bringing forward amendments to a criminal justice bill in the last Holyrood session were voted down by the SNP.

McDonald told the chamber on Thursday that he wanted to put on the record his thanks to McInnes for pressing the issue. McArthur likewise praised her “tireless work”, adding: “Eight-year-olds should be treated as children not criminals. The fact they can receive convictions which need to be declared for decades, or even the rest of their lives, is a national embarrassment.” The acting chair of the Scottish youth parliament, Amy Lee Fraioli MSYP, also welcomed the move, adding that children and young people across Scotland felt strongly about the issue. “Raising the age of criminal responsibility from eight to 12 is an important step towards fully incorporating the UN convention on the rights of the child into Scots law. Many children who find themselves in children’s hearings are also victims themselves, and are often ill-equipped to deal with the situations they find themselves in. Raising the age will help ensure that Scotland is a fair place for children, and shift focus to supporting children instead of criminalising them.”