A sheriff sent a stark warning to young drug dealers yesterday as he sentenced a teenager who had sold cannabis worth #10 to a schoolboy to four months' custody.

First offender David MacLean, 18, looked on in disbelief as Sheriff David Kelbie told him: ''The court has a duty to protect young people. I must make it absolutely clear that those who supply drugs of any kind to children are going to be dealt with severely.

''What is clear is you supplied these drugs to a child and that is not accepted.''

Aberdeen Sheriff Court heard that MacLean sold a 2.26g piece of cannabis to a 14-year-old schoolboy, who was later spotted with it by his school head master.

The sentence was welcomed by Scotland Against Drugs, which said the issue was about the sale of banned substances to children.

Spokesman David Macauley said: ''The issue is not the small amount of cannabis or being a first offender - it's dealing to children. If you do prosecute every case then the problems will skyrocket - and if he thought he would get community service then clearly that was not a deterrent.

''As a father of three boys myself, I think it's wholly appropriate that people should at last start to get the message that selling to underage children is socially unacceptable.''

A shocked relative of MacLean said later: ''I thought the sheriff was a bit harsh, but I suppose he's got to set an example.

''David thought he would get a fine or community service - he was in the wrong place at the wrong time.''

Depute fiscal Geoff Main told the court a pupil at Bridge of Don Academy, Aberdeen, was seen taking a small bag of what seemed to be cannabis from his track suit.

Grampian Police were called in and the schoolboy pointed the finger at MacLean, a former pupil of the school.

The cannabis he sold to the boy was worth #10, and an even smaller piece, worth less than #2, was later found at MacLean's home.

The unemployed teenager, formerly of Forsyth Drive, Balmedie, Aberdeenshire, now of Port Glasgow, admitted both supply of cannabis and possession in June last year.

His lawyer, Mr Gregor Kelly, told the court that MacLean knew the schoolboy by sight and thought he was older than 14 because of his height.

The boy approached MacLean and asked if he could get him a small piece of cannabis.

Mr Kelly told the court: ''He realises the serious and precarious position he finds himself in.''

MacLean maintained he only helped the boy once as a favour, and now regretted it.

Sheriff Kelbie said he had very little sympathy with MacLean's position, and told him: ''You should have not be in that business at all.''

Recent research by Scotland Against Drugs showed that three out of four adults in Scotland believe there should be far tougher sentences for drugs crimes.

MacLean's mother, who did not want to be named, said last night; ''I know what he did was wrong - he knows himself - but we did not think it would come to this.

''I think it was a bit harsh, although if someone had given drugs to David at that age I would be the first one after them.

''He's so quiet, it worries me how he'll cope.''

She added: ''I just cannot think straight after this.''

But the mother of the schoolboy given the drugs, who is now 15 and cannot be named for legal reasons, said: ''I know the courts are coming down hard on anything to do with drugs.

''Four months is maybe not a bad thing, even though it was my son who bought the drugs.''

A spokeswoman for Aberdeen City Council said: ''All teachers and head teachers would like to do all they can to ensure that schools are drug-free zones.

''However, we do not feel it is appropriate to comment on any particular case.''

q It was Sheriff Kelbie who last year jailed a Scottish police officer who supplied ecstasy tablets to investigative journalists for six months.

Shamed Grampian Police constable Euan Ranson had to resign from the force after being caught.

But Scotland Against Drugs said that the six-month sentence handed down to a trusted police officer by Sheriff Kelbie was too light and sent out the wrong message to the public.