A former deputy headteacher admitted a string of child pornography offences - but blamed his medication for giving him "inappropriate" urges.

Phillip Carmichael, 58, a former teacher at Wantage County Primary School, yesterday admitted having more than 7,000 indecent images of children on his computer.

Carmichael, of Adkin Way, Wantage, pleaded guilty at Oxford Crown Court to seven counts of making indecent photographs - ranging from the least serious level one, to the second most serious level four.

A former part-time music teacher at St Nicholas C of E Primary School in East Challow, Carmichael, who suffers from Parkinson's and Graves' Disease, also admitted four counts of possessing indecent pictures of children, totalling 7,466 images.

Peter Coombe, prosecuting, said: "There is a basis of plea put forward by the defence.

"The suggestion is the medication Mr Carmichael took was such that it caused certain side-effects, one of them is called hypersexuality.

"This can take the form of inappropriate or irresistible increases in desire for sex or intense sexual urges which are repetitive."

Mr Coombe told the court it was well-documented that Carmichael's medication could cause hypersexuality.

But he added: "What is not so well established is it would take the form of an interest in young children.

"We are in, to an extent, unknown territory as to whether the medication has created this behaviour or whether he had a predisposition to this."

Roger Harrison, defending, said the drug in question was called Dopamine Agonist and was used to treat Parkinson's Disease.

He said: "He doesn't take that drug any more and the effect is that any risk there may have been doesn't exist any more.

"These proceedings have caused extreme anxiety and the deterioration of the symptoms which he suffers.

"He is a man of impeccable character. He says, as a result of this particular drug being withdrawn, he no longer suffers such compulsions.

"He has done much for the community as a deputy headmaster for many, many years."

The court heard the offences ranged from April, 2002 to September, 2007.

Judge Patrick Eccles adjourned sentencing until August 22 for a report to be written, and gave Carmichael bail on condition he did not have unsupervised contact with anyone under the age of 16.

He said: "The court has well in mind the medical difficulties that you face and is obviously sympathetic towards that."

Medicines and Healthcare Regulatory Agency spokesman Florence Palmer said: "We have heard reports of hypersexual behaviour in connection with these drugs, but we don't know if it is down to the drugs or an underlying issue with someone's personality."