A gay teacher at a top Zimbabwean boys' school has resigned after death threats and pressure from parents.
Neal Hovelmeier, deputy head for St John's College's sixth form, came out to his students last week.
He was encouraged to do so as a Zimbabwean newspaper was planning on outing Mr Hovelmeier, the school's chairman wrote in a letter.
Some parents threatened legal action against him in a country where homosexual acts are illegal.
"I will not submit myself to a sham trial," Mr Hovelmeier wrote in his resignation letter.
The teacher, who has worked in the elite school for 15 years, apologised for the distress caused by revealing his sexuality, saying it has since led to "death threats as well as threats of physical danger to myself and my pets".
"I have come to realise that my current position as deputy headmaster is now untenable," he wrote in the resignation letter.
Mr Hovelmeier came out to the student body on 21 September when the school, which is based in the capital Harare, released a statement by him.
He wrote that former students had confided to him that they had felt intimidated and ostracised at the school amidst a homophobic atmosphere.
He said he could only deal with the issue if he was "open and transparent about it myself".
The emotive issue of homosexuality in Zimbabwe
By Shingai Nyoka, BBC Africa, Harare
The issue of gay rights has always been both controversial and emotive within Zimbabwe's conservative society.
It was one of the most contentious matters as a new constitution - adopted in 2013 - was being drawn up. The majority of Zimbabweans appeared to support the continued outlawing of homosexual acts - and a clause banning same-sex marriage was added to the country's laws.
Zimbabwe's gay community is small and largely operates underground. Secret gay bars do exist and the Gay and Lesbians Association of Zimbabwe (Galz) is formally registered and recognised as a civil society group, but in the past it has been raided by police.
Former President Robert Mugabe was most outspoken against gay rights, describing gay people as "worse than pigs and dogs". Other government ministers have been at pains to say that no person should be denied healthcare, or have their children lose access to education, because of their sexuality.
More recently when asked whether he would champion gay rights, Mr Mugabe's successor, President Emmerson Mnangagwa, said a constitution voted for by the people was in place, hinting that amidst the myriad challenges facing the country, the issue was not a priority.
The move was applauded by rights activists, but also led to uproar among some of the parents.
Footage of an emergency parents' meeting on 24 September showed participants angrily shouting at one another.
On the same day, the school's chairman Charles Msipa released a letter to the parents.
He took responsibility for Mr Hovelmeier coming out to the school, saying their hand was forced as a newspaper planned on revealing the teacher's sexuality.
Mr Msipa thought it was in the college's best interest if Mr Hovelmeier "communicate directly to stakeholders in an open, transparent manner".
"The publication of the story in the Daily News newspaper of Saturday September 22 was based on the management communication of the matter - rather than conjecture and rumours," Mr Msipa wrote.
The following day, a law firm hired by some of the parents threatened legal action against the school if its board did not resign, according to a letter by the firm seen by the BBC.
It said the teacher's decision to come out "has no place whatsoever in a school environment where they are minors, who look up to your staff as their life models as they exercise their role".
They also cited the country's Section 73 criminal law that criminalises gay sex, and said that their clients therefore reserved "a right to place criminal charges against your staff member".
The British curriculum boys school was founded in 1986 and admits boys from the age of 12 to 18, its website says.