A teacher accidentally downloaded his personal porn collection onto a primary school network, a tribunal has heard.

A General Teaching Council For Wales (GTCW) hearing was told Robert Adams was regarded as "one of the best" by bosses at Deighton Junior and Infants school in Tredegar and the IT coordinator was the go-to person when the school's network went into meltdown.

However, two days after preventing the loss of hours worth of lesson plans a nursery school teacher discovered a folder on the school network which had several images of naked women inside.

The shock find prompted a police investigation and Mr Adams' arrest.

He was later released without charge and denies any wrongdoing - despite a senior detective's hunch he had found "suspicious activity".

However, the GTCW is still conducting professional conduct proceedings into the matter.

If the teaching panel finds the allegation Mr Adams introduced pornographic images onto the school computer network it could strike him off the teaching register.

At a hearing in Cardiff, a panel was told that Mr Adams had been a teacher at Deighton Infants and Junior School in Tredegar, south Wales, for more than 20 years and was also its IT co-ordinator.

In autumn 2009, all schools in the Blaenau Gwent area suffered IT problems - and risked losing scores of pupils' work as well as lesson plans.

Retired headteacher Roger Fawke said on October 6, Mr Adams offered to help save the work from being lost and downloaded the work onto a USB memory stick.

Two days later, when the bug was fixed he re-uploaded the saved data back onto the school's "curriculum" network.

However, at the end of the school day fellow teacher Jayne Edwards logged onto the computer and found a folder called "Glam".

Thinking it was short for "Glamorgan", she doubled clicked on the icon - but told the GTCW she was shocked when she saw thumbnail photos of naked women.

She reported the matter to Mr Fawke, who then told Mr Adams to delete the images while he made a phonecall to the Local Education Authority.

He said he wanted the images to be deleted to ensure children did not see them.

However, officials told Mr Fawke the files should be left alone.

At the end of the day, Mr Fawke said Mr Adams handed over a USB stick which he claimed he had used to transfer the files.

Given the discovery, the matter was then referred to child protection experts - who subsequently contacted Gwent Police.

The force's computer crime investigator Blair Jones told the GTCW several devices belonging to Mr Adams were recovered from his home - including a laptop, several memory sticks and desktop PC.

Constable Jones said it was "beyond mere coincidence" that metadata linking a memory stick called "Vicspare" and the Glam folder was found on the school network and on Mr Adams' personal laptop.

He said one theory police had worked on was that Mr Adams had "accidentally" uploaded the pornographic images from his USB stick when transferring all the data across on October 8.

He said he was also of the view that Mr Adams was the "only person" who could really explain as to what had happened.

Representing the registrant was David Browne of the Nasuwt union. He said his client strongly contested the sole allegation against him.

Mr Adams is expected to give evidence at the hearing tomorrow. However, the GTCW's panel has ruled that this evidence will be heard in private due to "extenuating circumstances".