A former Fife headteacher who was jailed for two years after he was caught with nearly 3,000 indecent images of children has been struck off.
David Wilson, 48, from Paisley, was head teacher at Auchmuty High School in Glenrothes at the time of the offences.
Wilson admitted downloading pictures and video clips of children being sexually abused between 2004 and 2008.
He will remain on licence for two years after he is freed from his two-year prison sentence.
Wilson was detected as part of the Operation Algebra investigation, which has led to the arrest of about 200 suspected paedophiles around the world.
He was traced after detectives discovered he had communicated by e-mail with John Milligan, who was jailed for 17 years in 2009 for a string of child sex charges.
Meeting at its Edinburgh headquarters, the disciplinary sub-committee of the General Teaching Council Scotland agreed to remove him from the teaching register with immediate effect.
Its report said: "The sub-committee considered that the gravity and nature of the convictions were a serious departure from the standards expected, that public trust and confidence in the profession was seriously impaired, that the behaviour was of a serious sexual nature, and was likely to have placed children at serious risk of harm.
"In the whole circumstances of the case, it was the view of the sub-committee that the ultimate sanction of removal from the register was the most appropriate disposal."
Wilson will be barred from applying to be returned to the register for 12 months.
The sub-committee also decided that his name should be referred to Scottish ministers to consider whether he should be included on the list of those disqualified from working with children.