Education Secretary Michael Gove has apologised to his former French teacher for misbehaving in class 30 years ago.
In a letter published in the Radio Times, he says he cringes when he remembers himself, aged 15, competing to ask "clever-dick questions" and indulging in "pathetic showing off".
He asks the teacher, Mr Montgomery, whom he refers to as Danny, to accept his apology.
Mr Gove goes on to pay tribute to the work of the teaching profession.
The letter says: "It may be too late to say I'm sorry. Thirty years too late."
He adds: "When I look back at the 15-year-old I was, lurking at the back of your French class at Robert Gordon's College in Aberdeen, I cringe.
"You were trying, patiently, doggedly, good-humouredly, to broaden our horizons. You were, without any pretension or pomposity, attempting to coax a group of hormonal lads to look beyond familiar horizons and venture further.
"You weren't just dinning irregular verbs into our heads, you were opening up a different way of seeing.
"And all we could do was compete to think of clever-dick questions to embarrass you and indulge in pathetic showing-off at your expense."
Mr Gove writes that his former teacher was "unaffectedly passionate" about both French and German.
But he was confronted with a "cocksure crew of precociously assertive boys who recognised you were only a few years older - a rookie in the classroom - and therefore ripe for ragging".
Mr Gove acknowledges that because they misbehaved they missed out, and thanks Mr Montgomery for his perseverance.
"As I've grown up - and become a father myself - my gratitude only grows. To you, and to everyone else in your profession," he says.
Mr Gove goes on to tell the teacher that his work, and that of the rest of the teaching profession is "hugely appreciated".
He ends by saying: "So Danny, it may be too late to say I'm sorry. But, as my mum told me, it's never too late to set the record straight.
"And you were a great teacher - one of many who helped introduce me to the work of great thinkers and writers - and thus gave me the greatest gift of all - the chance to write my own life story."
National Union of Teachers general secretary Christine Blower said: "So Mr Gove recognises that teachers are not the enemies of promise or happy with mediocrity as he previously asserted.
"I take this open letter as an apology to the profession for those unacceptable characteristics and a recognition that teachers do an amazing job every day.
"Teaching is indeed of critical importance so if Mr Gove really believes that let's see policies emanating from the DfE [Department for Education] that teachers would welcome."