A 17-year-old Irvine pupil was arrested over alleged threats made to fellow students online.

Police attended Irvine Royal Academy on Monday as part of a probe into the alleged Facebook messages and threats made by the teenager.

The senior pupil was held by officers in connection with an offence under the Communications Act.

The pupil has now been released from custody pending further enquiries.

A Police Scotland spokeswoman said: “We can confirm that on Monday January 16, police received a report of an alleged offence contrary to the Communications Act 2003.

“As a result of police enquiries, a boy was arrested in connection with the incident.

“A report will be sent to the procurator fiscal.”

The pupil was expected to appear in private at Kilmarnock Sheriff Court on Tuesday but was released from police custody to allow further investigation to take place.

A Crown Office spokesperson said: "The procurator fiscal received a report concerning a male, in connection with alleged incident on January 10, 2017.

"After full and careful consideration of the facts and circumstances of the case, he was liberated from custody pending further inquiries and did not appear in court."