The master of Dulwich College, who has been at the centre of sexual harassment allegations, dramatically resigned his post last night after a seven-hour meeting with governors.
A statement issued through solicitors said Anthony Verity, 56, was to take early retirement from the pounds 12,270-a-year college in south London where he had been headmaster since 1986.
Governors had earlier cleared him of sexual harassment claims made by school secretary Anne Ridley, 38, but yesterday they found that Mr Verity "had permitted an inappropriate relationship to develop and this affected the performance of his duties".
Mr Verity, who will receive a financial settlement rumoured to approach pounds 1 million, strongly disputed there was any impropriety.
But after the meeting at a private club in central London, he looked stern-faced as he left with his wife, Patricia, saying: "I'm not allowed to say anything."
Shortly afterwards, Jane Mann, solicitor for the school, released a statement outlining both parties' agreement that it was "in the best interests of the college" for the father of two to take early retirement.
She released no details of the financial package.
Sir Colin Cole, chairman of the governors, said: "This has been a stressful and unhappy time for the college and all concerned. The governors' sole objective throughout has been to protect and sustain the fine reputation of Dulwich College.
"Mr Verity has made a very considerable contribution to the life and success of the college over the last eight years, for which the governors and parents are very grateful. We wish him well in the future."
The school was now determined to get back to normal, Sir Colin added, and would advertise for a new master next week.
Ann Ridley has also left the college on mutually agreed terms.
Mr Verity was suspended in August, four months after Mrs Ridley, his secretary of four years, claimed that he sexually harassed her on a trip to Thailand last November.
Many parents were furious to be told of the claims only just before the start of this term. Mothers led by Sue Macdiarmid and Deborah Roslund launched a campaign of support for the head.
Dulwich was founded 375 years ago.Alumni include P.G. Wodehouse, Raymond Chandler and Eddie George, Governor of the Bank of England.
Mr Verity was awarded a first class degree at Cambridge University. At Dulwich he was in charge of 1,400 pupils.