A headteacher who was sacked after becoming embroiled in child sex abuse allegations has won his case for unfair dismissal.

Derek Curran was accused of having an affair with an underage girl and fathering a child with her in a complex case involving lengthy investigations by the police, the teaching regulatory body and his employers.

The 57-year-old, of Edinburgh, was dismissed after he failed to report the claims, which were reported to the school years later, straight away in line with child protection procedures.

The allegation was anonymous at first, with the woman claiming only that a current teacher at the school had a sexual relationship with her when she was just 15, but she later named Mr Curran as the teacher involved.

The headteacher, who had been drafted in as a "super-head" to help the city's ailing Castlebrae Community High School, was charged with having underage sex but the case was later dropped.

Read moreU-turn on closure plan for school celebrated

He raised a claim of unfair dismissal against City of Edinburgh Council and has now won his case after employment judge Murdo Macleod found that the authority "failed to follow a fair procedure".

He has been awarded almost £10,000.

The tribunal heard that Mr Curran took up the role of acting headteacher with the Edinburgh school in April 2013 and around a year later was made aware of an allegation involving another teacher, Gavin Atkinson.

A woman, believed to be aged 24 at the time, who was studying at the school claimed she had received a string of sexually inappropriate emails from Mr Atkinson and an investigation was launched.

It was during that investigation that the woman claimed she had also previously been in a sexual relationship with another teacher at Castlebrae which began when she was a 15-year-old pupil at another school.

She did not disclose the name of this teacher - which turned out to be Mr Curran - until a later date.

A written judgment on the case states that Mr Curran did not report the claim of historic abuse straight away in line with the council's child protection policy, but notified his bosses "within days of finding out about it".

The tribunal heard that during a meeting with Mr Curran to discuss her claims against Mr Atkinson, the woman said that Mr Curran was not investigating properly and added: "I know why you are doing this - having sex with students."

Mr Curran claimed that when he questioned this, she said: "I know you have sex with students, that's why you're doing this."

He also claimed that she told him that his job was on the line.

He reported the details of the meeting to the council's Head of Schools Andy Gray.

The headteacher, who had 33 years' teaching experience, was later suspended in June 2014 when the woman named him as the other teacher she was accusing.

The council set aside the sex abuse claim while criminal investigations were ongoing, but launched a disciplinary investigation looking at six allegations including failing to take appropriate action over the historic abuse claim.

He was also accused of failing to properly investigate the claims against Mr Atkinson, who was charged with a communications offence which was also later dropped by prosecutors.

Mr Curran, who also had a domestic abuse case against him thrown out of court, was eventually dismissed in September 2015.

Judge Macleod found that his failure to report the historic claim was gross misconduct, saying: "In my judgment, the [council] was entitled to find that the claimant, having been notified of a child protection issue which gave rise to the potential that the perpetrator was still working at the school, which in turn made it possible that there was an ongoing risk to children at that school, amounted to a gross failure of his responsibilities, and thus amounted to gross misconduct.

"The seriousness of the allegation was such that even though the evidence shows that the individuals who might be implicated included the claimant himself, it would have been essential for the matter to be referred to the appropriate officers as a matter of urgency."

However, the judge found that the other allegations against Mr Curran did not amount to gross misconduct and as the council had lumped them together when dismissing him, the process was unfair.

Judge Macleod found that the council had also acted unfairly when it carried out a disciplinary hearing in Mr Curran's absence when he had appealed for it to be postponed due to his ill health.

Mr Curran is currently subject to a Temporary Restriction Order by the General Teaching Council for Scotland and an investigation into whether or not he should be allowed to teach again is ongoing.

A City of Edinburgh Council spokesman said: “We are aware of the judgement and it would be inappropriate to comment further on these issues.”