A teenager who supplied ecstasy tablets which put six children in hospital has been jailed.

The 17-year-old, who can't be named for legal reasons, gave the potentially lethal Class A pills to two 13-year-olds, who then shared the tablets with their friends, also aged 13.

Sheriff Shirley Foran gave the teenager eight months' detention "as a matter of deterrence if nothing else".

Two of the girls met him at a retail park in Irvine, Ayrshire, and picked up the pills - stamped with an owl logo similar to the Trip Advisor brand - before going to one of the friend's house.

Kirsty Urquhart, prosecuting, said: "The witness' mother quickly became aware that the group were under the influence of some substance, and cleared the house, and took her daughter to hospital.

"She also contacted as many of the other parents as she could in order that they too could be taken to hospital.

"Five children were thereafter taken to hospital, and police located a sixth child to ensure her welfare, and she was also brought to Crosshouse Hospital for treatment."

All the children had elevated blood pressure and heart rate consistent with having taken ecstasy, and were kept in overnight for observations before being discharged with following day.

The teenager admitted supplying ecstasy to two of the girls at Rivergate retail park in Irvine, on February 24.

Defence lawyer, Simon Brown, told the court that his client was approached by the girls, had not sought them out, and put in a guilty plea at the first opportunity.

Mr Brown added: "He expresses his extreme regret at the situation he finds himself in. He had no understanding of how serious the situation could become.

"It's a drug he has taken himself without any difficulty.

"His details were passed on to the girls as someone who had just taken a supply of ecstasy."

However Sheriff Foran concluded: "We have a number of children hospitalised here.

"I would be failing in my duty if I did not reflect the gravity of this offence with a sentence of detention."