The 34 second clip, recorded from the other side of the headteacher's locked door, later went viral.

Mr Daniels, 57 and Miss Thomas - formerly Mrs Bale - both resigned from Ysgol Gyfun Gymraeg Bryntawe in Swansea but insisted they were still good teachers with plenty to offer.

Bryn Tawe School in Swansea (Image: Wales News Service)

However, the Education Workforce Council (EWC) ruled the pair's reckless and selfish behaviour had damaged the reputation of the teaching profession and their former school.

Panel chairwoman Jacquie Turnbull made a prohibition order on both registrants after saying their sex sessions over 11 months in school were not just an isolated incident.

"The sex acts occurred on school premises when pupils and staff were present and they later had a big effect on the whole school community.

"The unacceptable, reckless and risky behaviour took place over an extended period of time.

"Their actions were fundamentally incompatible with the standards expected of a registered teacher...and brought the school into disrepute."

Head Graham Daniels (Image: Wales News Service)

At an EWC hearing in Cardiff, Mr Daniels and Miss Thomas admitted having sex sessions on school premises between May 2013 and April 2014.

The couple, who were married to other people at the time, said they both deeply regretted their actions and were completely ashamed.

Their union representative Tim Glover argued they should still be allowed to teach and were excellent teachers.

Mr Glover, of ASCL, said Mr Daniels and Miss Thomas had an otherwise unblemished career and had played a key role in the school becoming one of Swansea's best.

He said: "They both have a great deal to offer in two highly sought-after subjects of maths and science.

"They also acted honourably by resigning and co-operating fully with these proceedings - where they have shown true insight and remorse."

However, case presenter Louise Price argued otherwise.

She said: "They knew what they were doing was wrong....and there is the question of how their behaviour would have continued had they not been discovered (in the head masters office)."

Chemistry teacher Bethan Thomas (Image: Wales News Service)

Once their affair came to light, the two teachers became figures of fun at the Welsh language comprehensive and colleagues said exam results suffered as a result.

The school's current deputy head Graham Jenkins previously told the EWC that staff found it difficult to get children to concentrate during lessons because they could not stop "making comments or references" to the YouTube video.

Mrs Turnbull said the EWC had considered imposing other penalties on Mr Daniels and Miss Thomas - including a formal reprimand and conditional registration - but added: "They abused their position of trust ... because of their senior positions they should have been role models for staff and pupils.

"The conduct was so serious that only a prohibition order can be justified."

Mr Daniels and Miss Thomas can apply to go back on the teaching register in three years time.

Both looked visibly upset as they left the hearing at The Parc Hotel.

Try our quick news quiz below:

Question -1 of 5Score -0 of 0

According to Dr Andrew Breeze, a philologist from Navarre University in Spain, where was King Arthur from?