A teenage schoolgirl has been detained over a "wicked" acid attack which left a fellow pupil scarred for life.
Emily Bowen, now 18, poured drain cleaner into a viola case owned by Molly Young after finding out she was dating her former boyfriend.
Ms Young was badly hurt after the acid spilled over her legs at Knox Academy in Haddington, East Lothian.
Sentencing Bowen to 21 months, Sheriff Michael O'Grady said the courts would not tolerate the criminal use of acid.
The teenager admitted recklessly and culpably pouring sulphuric acid into a viola case in the knowledge it would be removed from a shelf by the victim, causing her injury and permanent disfigurement.
Both girls were 17 at the time of the attack in September 2016, which restricted previous reporting of the case, but both can now be named as they have turned 18.
Edinburgh Sheriff Court heard that the two girls were acquaintances and members of the school orchestra before the incident, with Bowen playing the clarinet and Ms Young the viola.
However, the "talented musicians" fell out after Ms Young began going out with an ex-partner of her attacker.
Bowen planned the attack by buying drain cleaner online, before sneaking into the school's music room and pouring the substance, which was 91% sulphuric acid, into the viola case.
When Ms Young took the instrument down from the shelf, she was aware of an "eggy smell" and saw red liquid spilling from the bottom of the case onto her leg. Her tights began to disintegrate and she felt an "intense burning".
The victim, now also 18, was taken to Edinburgh Royal Infirmary for treatment, and eventually transferred to St John's Hospital for plastic surgery. The court heard that she continues to suffer psychological problems and has "shooting pains and nerve damage" due to the attack.
The school was sealed off by police and the fire service due to chemicals being involved in the incident.
Bowen was seen crouching in the otherwise empty classroom by a fellow pupil minutes before the attack. When police seized her phone, they found evidence of her researching acid attacks and how long attackers are jailed for.
Defence solicitor Jim Stephenson said his client had recently been diagnosed with autism and was suffering from depression and "struggles to deal with things".
Sheriff O'Grady told Bowen the attack was "utterly wicked", adding: "You have left a young woman to suffer a terrifying ordeal and she will be both physically and mentally scarred for the rest of her life.
"You should understand there is currently a very real public concern and fear about the emergence of this awful substance.
"It must be plain to anyone who resorts to acid for whatever purpose that the courts will not tolerate its possession or use for any criminal act. It is with considerable regret that I have come to the conclusion that nothing but a custodial sentence is appropriate."
The sheriff also imposed a five-year non-harassment order barring Bowen from contacting Ms Young.