She added: "How can a senior ranking officer come to Holyrood and tell Parliament that officers are regularly doing something that even the police consider indefensible and then walk out the front door and carry on regardless."

The First Minister said the Scottish Police Authority (SPA) had asked for an explanation from Police Scotland as to why children were being searched, and the matter would be discussed in public at its next board meeting.

Ms Sturgeon said: "Clearly this is an issue that many people will have concerns around. When the police search children it is generally to ensure that they are safe and we understand that a proportion of these searches are because drugs or weapons may have been concealed by others on very young children."

She added: "I have spoken to the chief constable about stop-and-search and I can advise Parliament that following a six-month pilot in Fife, he is now considering whether the practice of non-statutory or consensual stop-and-search should be ended and I welcome this."

Ms Sturgeon said the move would see non-statutory stop-and-search ended for everyone, and she has asked the chief constable to consult with both the SPA and Her Majesty's Inspectorate of Constabulary in Scotland, and provide an update to the Justice Secretary by the end of March.

There are currently two types of stop-and-search used in Scotland.

Statutory searches require grounds for reasonable suspicion and do not need the person's consent.

Non-statutory searches do not require reasonable suspicion. Officers are not required to inform people that they may refuse the search and there is no requirement to meet a particular standard of consent.

The latter is the most common form of stop-and-search in Scotland, but it is not permitted in other parts of the UK.

Police carry out stop-and-search

A pilot scheme was launched in Fife last summer requiring officers to state clearly to people who are the subject of non-statutory searches that they have the right to refuse.

Under the pilot, officers also wrote to parents of children who had been stopped and searched, explaining the reasons why their child was targeted.

Ms Sturgeon added: "Stop-and-search... can be a vital tool that the police have at their disposal to keep us safe, but there is a concern - and it has been expressed not just by politicians but by the Scottish Human Rights Commission - that the use of consensual non-statutory stop-and-search raises issues and those are the issues that the chief constable is acknowledging, and that is why there will now be consultation about bringing that practice to an end.

"It is the position of Police Scotland that they do not carry out consensual stop-and-searches on children under 12. That is the position. There will be circumstances, as we have seen from the figures, where those are carried out, and that is what the SPA has asked Police Scotland to give an explanation for.

"I don't want to pre-judge what that explanation is.

"What the chief constable has indicated to me - and I welcome this - is that he now wants to move to a situation where the practice of consensual stop-and-search is ended for everyone."

Liberal Democrat leader Willie Rennie said: "The chief constable better have a good explanation as to why for six months there has been continued stopping and searching for under-12s."

He asked Ms Sturgeon if she would consider legislating to prevent the practice.

"There is one solution that is in her hands," he said. "She could make it the law in this Parliament for Scotland that there is no more consensual stop-and-search."

Ms Sturgeon said the legislative process would be likely to take longer than the process of consultation she had described.

"It may be there is an argument for doing that (legislating) on a belt and braces approach, and I am very happy to give that consideration."

Try your hand at our daily news quiz:

Question -1 of 5Score -0 of 0

As the ruins of 15th century Laird James Barclay's castle go on sale, what made him so infamous ?