Musselburgh Grammar School is a large state secondary school that serves as the main secondary school for Musselburgh and the surrounding areas. It dates back to the sixteenth century, although the present building was erected in 1835. Until the 1950s the school was a fee-paying school. As of 2014 the school's roll was 1227.Ronald Summers, who had been in position since 2003, retired as Headteacher in June 2014 to take up a position with the SQA where he will oversee the introduction of the new Higher and Advanced Higher courses. Stewart McKinnon was Headteacher from August 2014 until February 2015 when Colin Gerrie former head teacher of Dalkeith High School took over.Primary SchoolsThere are six nearby primary school which feed into Musselburgh Grammar School: Stoneyhill Primary School, Campie Primary School, Pinkie Primary School, Burgh Primary School, Whitecraig Primary School and Wallyford Primary School.HMIE ReportsIn June 1999 the school was criticised following a Care and Welfare Inspection by Her Majesty's Inspectorate of Education. The report referred to having witnessed a battle between rival gangs in the school entrance area and that a third of pupils surveyed feared for their own safety. It also mentioned general weaknesses in safety, security, care and welfare, although the staff were praised for their efforts in the face of serious challenges. This led to a media furore with some newspapers describing the school as 'the worst school in Scotland'.A follow up inspection in 2000 reported that the school and East Lothian Council had "responded promptly" and made "very good progress" in tackling the problems identified. Since then there have been many positive changes in the school, including the appointment of Ronald Summers as Headteacher, giving rise to improved standards across the board. The school also underwent a major refurbishment under the PPP Scheme during this time to improve the quality of the accommodation.