A "threatening" letter sent to children's commissioner Peter Clarke during a school sex abuse investigation was "written in anger", a court has been told.
Jeff Jones, the recently retired leader of Bridgend county council and former education spokesman for the Welsh Local Government Association, will find out next week if he faces jail over the allegedly "contemptuous" letter.
It was written last November, just after Mr Clarke had completed public hearings into claims that former drama teacher John Owen sexually abused pupils at Ysgol Gyfun Rhydfelen in Pontypridd.
In the letter, Mr Jones said he was "appalled" at the way Mr Clarke was conducting the Clywch inquiry. He defended Bridgend's then education director, Eddie Roberts, and warned the inquiry was in "real danger of producing a travesty".
Mr Jones wrote: "I've been frankly appalled at the way the inquiry was conducted and I've already sent a letter to Rhodri Morgan (the Welsh Assembly's First Minister) expressing this view. I am not prepared to see Mr Roberts being made a scapegoat."
In the letter he had claimed that similar abuse to that perpetrated by Owen would not have occurred in an English-medium school, and that "people have put the Welsh language before the interest of the children".
Mr Milwyn Jarman, representing the Children's Commission before Cardiff county court last week, said: "Mr Jones was writing directly to the commissioner in a way that was not open to public scrutiny. It is a contempt to try and undermine his authority."
But Mr Jones, who denied contempt, told the court: "I wrote the letter in anger and I was not referring to the parents but to school staff and the governing body."
Mr Jones was warned he could face up to two years in jail and an unlimited fine.