A male teacher has been praised for bravery after it emerged he will undergo a sex change operation before returning to take classes as a woman.

Pupils were called into a special assembly at King Edward VI Grammar School in Chelmsford on Monday and told the male teacher would be returning as a woman after the summer holidays.

A letter was also sent home to parents explaining the procedure.

Pupils at the secondary school are said to have taken the news well, with one sixth former describing the unnamed teacher as "really popular".

The letter, from headteacher Tom Sherrington, said: "In making the transition (the teacher) will now be able to live the life that she has always known to be consistent with her true gender identity.

"I would like to acknowledge (the teacher's) courage in deciding to go through the transition process.

"I know that the school community will support her to ensure that she makes a great success of her ongoing career with us.

"Without doubt she will continue to be greatly loved and admired as the truly inspirational teacher that she is."

The letter goes on to ask that pupils and parents continue to treat the teacher with respect.

"Clearly, it is of great importance that (the teacher) is allowed to return to work without fear of prejudice, intolerance or harassment," it reads.

"As you would expect, we will not tolerate any harassment of any kind, be that within the school, outside its gates, through online forums and social media or on school trips."

Pupils have been provided with information to help them understand gender dysmorphia.

In a statement, the school said: "King Edward VI Grammar School is proud of its commitment to equality and diversity among its staff and students.

"We support them all, we treat them with respect and have due regard for their privacy and wellbeing at all times, regardless of their age, disability, gender, gender reassignment, ethnicity, religion or sexual orientation."