Police Scotland should end the controversial tactic of consensual stop and search, an independent report has concluded.

The Scottish Government set up an advisory group led by solicitor advocate John Scott QC to look at the future of the policy in Scotland.

In March, the force confirmed there would be a presumption against consensual, or non-statutory, stop and search for all age groups.

These searches differ from statutory searches, where a person is stopped under legislative powers and reasonable suspicion is required.

The report concluded: "Non-statutory stop and search lacks any legal framework and is of questionable lawfulness and legitimacy, with poor accountability."

The group has recommended that a code of practice backed by law be developed to cover stop and search. This should be consulted on and subject to frequent review.

A majority also agreed that consensual searches should come to an end at the point at which the code comes into effect.

"All searches by police officers in Scotland of persons not in custody should thereafter be undertaken on the basis of statutory powers exercised in accordance with the code of practice," the report says.

It adds: "If non-statutory stop and search is ended, officers of Police Scotland will still be able to carry out their duties effectively. Abolition will not result in any significant gaps."

The report calls for a consultation on whether to change the law to give officers the power to search children under 18 for alcohol when they have reasonable grounds for suspicion.

It also wants Police Scotland to provide regular and public reports and data about stop and search to oversight body the Scottish Police Authority.

Earlier this week, First Minister Nicola Sturgeon confirmed to parliament that a statutory code of practice on stop and search would be introduced.

The force came under fire after research found stop-and-search rates in Scotland were the highest in the UK, with a significant number of children and young people stopped.

The report said: "The evidence we have seen, and even anecdotal submissions, support what we had understood to be the position - on the whole stop and search, and particularly non-statutory stop and search, is used disproportionately on children and young people, in particular young men, in Scotland.

"To a significant extent, the tactic has been used on children and young people in areas afflicted with poverty and social deprivation.

"The unseen consequences of dented or broken public confidence, particularly in deprived areas of the country, should not be ignored."

It adds: "It seems clear that the use of targets, or KPIs, featuring stop and search led to a proliferation in the use of the tactic, both before and following the establishment of Police Scotland.

"Even some police sources have conceded that the extent of use of the tactic took it beyond any available intelligence and best use of officer hours."

Scottish Liberal Democrat justice spokeswoman Alison McInnes said: "This report confirms that hundreds of thousands of people have been the subject of unregulated and arguably unlawful police searches.

"Driven by an unhealthy targets culture and a one-size-fits-all approach, the practice unfairly targeted young and vulnerable people across Scotland. Complacency from SNP ministers and police chiefs allowed this to go on for more than two years.

"The case for comprehensive reform of this discredited tactic is now overwhelming. There is no place for random, unregulated police searches in a modern, progressive Scotland.

"I am delighted that the independent review group has backed my calls for so-called consensual stop and search to be abolished and for a statutory code of practice to regulate statutory searches."