Fiona Kirkby, Procurator Fiscal for High Court Sexual Offences, said:
"William Bain is a prolific offender who repeatedly exploited his position of trust as a teacher to sexually abuse children in his care.
"He has now been held accountable and imprisoned for his depraved actions.
"This prosecution should send a clear message to those who sexually abuse children and young people, regardless of how much time has passed.
"I would urge anyone affected by similar crimes to report it when they feel ready and able to do so.
"You will be listened to and supported as we use all the tools available to us in seeking justice."