A teacher who was sacked after being charged with a child pornography offence has won his case for unfair dismissal.

The man, who cannot be named for legal reasons, was accused of possessing indecent images of children but prosecutors decided not to pursue the case against him.

Local authority bosses took the decision to dismiss him, claiming there had been a breakdown of trust and that he posed an “unacceptable level of risk to the council of serious reputational damage”.

However, the educator launched an employment tribunal for unfair dismissal and - after losing his initial case - has now won his claim at the Employment Appeal Tribunal in Edinburgh.

Lord Summers found that the council should not have dismissed him on the basis that he might have committed the offence, and that his invitation to a disciplinary meeting did not make it clear that he was at risk of being sacked on the grounds of reputational risk to the council.

The tribunal heard that the man had been employed by the authority for 20 years and had an unblemished record.

However, on December 30, 2015, police searched his home on suspicion that “indecent images of a child or children had been downloaded to an IP address associated with the claimant”.

A judgment on the case states: “The claimant lived at the address with his son. Both he and his son were taken to the police station for questioning.

“The police examined three computers in the claimant’s home. One was found to have data that was of interest.”

Shortly after the raid, the teacher met with his head teacher to tell her about what had happened and he was suspended while the matter was investigated.

He “denied from the outset that he was responsible for the images being on the computer”.

Police charged him with possessing indecent images of children and a report was submitted to the procurator fiscal.

However, in April 2016, the Crown Office issued a letter saying that “on the basis of current information available” they would be taking no further action at that time. The letter made it clear that prosecutors reserved the right to prosecute him at a later stage.

The council then requested information from the Crown but received a heavily redacted reply and a letter stating they “could give no view on whether the claimant was a risk to children”.

The teacher was then asked to attend a disciplinary hearing.

The judgment states: “At the hearing he accepted that the police had found indecent images on the computer. He stated, however, that he did not know how they got there. He denied having downloaded the images.”

He was dismissed in December 2016 following the hearing.

His dismissal letter stated that the council was “unable to exclude the possibility” that he downloaded the images and it would cause “serious reputational damage” if the incident became public knowledge.

Lord Summers substituted the original tribunal’s decision with a finding of unfair dismissal. The case will now return to the original tribunal.