A 15-year-old girl walked through school with a blood-stained knife after stabbing her friend in the playground, the High Court in Perth was told yesterday.

Ashley Smith, now 16, took a knife from her mother's kitchen to Bell Baxter High School, Cupar, Fife, and stabbed Lyndsay McKenzie four times in the head and body, in a row over heroin.

Smith claimed that Miss McKenzie, also now 16, had abandoned her at a drug dealer's house where she was injected with heroin by a mystery man.

Initially charged with attempted murder, she pled guilty to stabbing her friend to her severe injury and permanent disfigurement. Sentence was deferred for reports.

Stephen Woolman, advocate depute, said both girls - along with others at the school - had experimented with heroin.

''Ashley Smith blamed Lyndsay for having led her to become involved in drugs, and in particular, for putting her in a situation where she was injected with heroin.

''On May 11 last year, they both went to school and at morning break met up with other friends and chatted,'' Mr Woolman said.

''Initially, the chat appeared friendly and Ashley asked Lyndsay if she wanted to borrow some make-up.

''Shortly after that, Lyndsay moved to walk away from Ashley, and Ashley ran up behind her and stabbed her.''

Miss McKenzie suffered a four-inch shoulder wound and a two-inch cut on her back. Other cuts were found on her head and body by staff and pupils who raced to the scene.

Counsel Brian McConnachie told the court Smith had gone to a drug dealer's house in Kelty, Fife, and had been smoking heroin with her friends. They then left and she had vague memories of being injected with heroin at the house, for the first time. She had been at the house for around 24 hours.

Mr McConnachie said she started smoking heroin four months earlier, because she was depressed after being assaulted by a relative.

''Lyndsay McKenzie offered Ashley Smith heroin. She was introduced to it on the basis that if she smoked it she would feel better, and on a temporary basis that was very clearly the effect.

''From there on, Ashley and Lyndsay and one or two others were smoking heroin three times a week,'' he said.

He said that for a week after being left at the dealer's house it preyed on her mind and led to the attack.

''She had it out with Lyndsay the next time she saw her. She felt Lyndsay thought the whole situation was quite funny.''

Mr McConnachie said Smith had an urge to take revenge and went to school with a knife. He said she was still carrying it as she wandered through the school after the attack.

A teacher who managed to grab her and take the knife away described her as in a dazed state.

Lord Bonomy deferred sentence for reports to the High Court in Glasgow, on April 23, and warned Smith the court had to take a ''serious view''.