Three middle class teenagers fired up by inter-school rivalry turned into killers, a court heard yesterday.

Iain Wheldon and Graham Purves, both 17, and Ross Gravestocks, 16, kicked 19-year-old mechanic Mark Ayton to death because he came from the wrong school, the High Court in Glasgow heard yesterday.

The trio were at Balerno High School whose pupils fought at weekends with rival boys from Mark's old school, Currie High, in the neighbouring town.

Wheldon, of Turner Avenue, Purves, of Mansefield Road, and Gravestocks, of Ravelrig Park, all Balerno, were the sons of well-to-do parents, as was their victim.

Wheldon's father is a police inspector, Purves is the son of a print company managing director and Gravestocks is the son of two lecturers.

Mark's father, Malcolm, of Cherry Tree Loan, also Balerno, is a tax inspector.

Despite their model backgrounds and good upbringing Wheldon, Purves and Gravestocks chased Mark and his brother, Paul, as they strolled home in the early morning after a night in the pub. Wheldon and Purves had also been drinking that night.

Mark, a fit young football player who was said to have had a bright future ahead of him, was shown no mercy when he stumbled and fell face down into a flower bed. Wheldon, Purves and Gravestocks repeatedly kicked and stamped on his head.

The teenagers then left him bleeding and unconscious, the imprints of their bootlaces in his face.

The trio, who were all 16 at the time, will be sentenced at the High Court in Edinburgh on May 20 and remain in custody.

All three were originally charged with murdering Mark but, in the closing stages of their trial at the High Court in Glasgow, they pled guilty to the lesser crime of culpable homicide.

Wheldon and Purves pled guilty on Tuesday and Gravestocks yesterday after being visited by his parents in the cells.

The Crown prosecutor, Mr Graham Bell QC, also accepted pleas of not guilty to an attack on Mark's brother, Paul, 21, during the same incident.

A fifth teenager, Mr Paul Learmont, 17, of West Croft, Ratho, Edinburgh, had charges of assaulting Mark and Paul withdrawn last week.

Mark's death shocked residents of Balerno, which rarely sees trouble of any sort. But yesterday Mr Derek Ogg, defending counsel for Gravestocks, painted a picture of simmering weekend violence between pupils of two local schools, Balerno High and Currie High.

Gravestocks, Wheldon and Purves were all pupils at Balerno, and Mark and Paul, despite the fact they lived in the town, were former pupils of Currie.

Mr Ogg said no harm was done as a result of the frequent skirmishes except for boys ''dusting themselves down'' afterwards.

But in this case the consequences were ''grave and totally unexpected'' by Gravestocks and the two other accused.

Mr Ogg said that Gravestocks had not even been with Wheldon and Purves that night and only joined in after seeing them give chase.

He added it was a tragic case for the families of all the boys involved.

There was evidence during the seven-day trial that anti-English feelings may have been behind the incident.

Paul told the court that as they were chased, Mark said he heard shouts of anti-English abuse. There was also evidence some youths had been singing Flower of Scotland.

Mr Ogg denied a racist attack was the motive, and pointed out that Mark and Paul, although they spoke with English accents, were native born Scots. Both their parents were Scots and the boys had lived south of the Border for much of their lives until they moved to Scotland, settling down in Balerno in February, 1992.

Gravestocks, he revealed was English with English parents.

The actual details of Mark's death caused controversy between pathologists. All agreed that Mark had received blunt force head injuries caused by kicks and that there were no facial or skull fractures or major brain injuries.

The Crown pathologist, however, claimed that Mark had suffered brain damage which could only be seen under a microscope. Professor Anthony Busuttil said the kicks had rattled Mark's brain inside his skull causing bleeding and damage to its complicated electrical circuitry.

Defence experts, however, claimed Mark had drowned in his own vomit after the attack.

Wheldon's defence QC, Mr Jack Davidson, claimed yesterday that there was an ''absence of real malevolence'' in the attack and that all three had no idea of the effect it had on their victim.

He claimed Mark's injuries were individually ''moderate'' and added: ''Wheldon had sincerely expressed his sorrow for what happened.''

Mr Alexander Bolland, QC, said Purves wished he could turn the clock back.

The Daily Record and Edinburgh Evening News were each fined #8000 after being held in contempt of court by Lord Eassie for misreporting the evidence on the second day of the trial.

Defence counsel described the misreporting as ''gross contempt'' and the Crown agreed.

The Edinburgh Evening News reporter responsible was also fined #750.

The news agency reporter who had filed a story on the trial proceedings for the Daily Record was exonerated.