Popular John of Gaunt headteacher Andy Packer said an emotional goodbye to staff and pupils on his last day at the school.
Mr Packer has been at the school in Wingfield Road, Trowbridge, for 10 years, but decided to leave at the end of term in order to seek a fresh challenge.
He will be replaced by Mike Gunston, who was deputy head at the school for three years. Mr Packer said he is leaving the school in very safe hands.
Mr Packer, who has a wife and two children, said: “Thank you personally to everyone who has meant so much to me in my 10 years as headteacher.
“Without a shadow of a doubt these ten years have been the best of my 34 years in teaching and I will treasure the memories that I take with me.”