Rory McGrath has pleaded guilty to harassing a married woman for 14 months. The comedian, who had a five-year affair with her, appeared at Huntingdon Magistrates' Court in Cambridgeshire on Thursday.
Rory, of Grantchester Street, Cambridge, was sentenced to ten weeks in jail, suspended for 18 months. He was also given a five-year restraining order and ordered to pay £200 in costs.
The TV star was charged with following the woman, sending her electronic messages and approaching her in the street. She cannot be named for legal reasons.
Rory McGrath with his wife Nicola, pictured at the hearing
Rory, 60, had originally denied a stalking charge but when it was changed to harassment, he pleaded guilty. He attended the hearing with his wife Nicola.
The court heard that Rory and the unnamed woman had an affair between November 2010 and May 2015.
"Both the defendant and the complainant were married to other people and their relationship had managed to be kept secret from their respective spouses," Anthony Abell, prosecuting, told magistrates.
By August 2014, the woman wanted to end the affair after she felt that Rory was "difficult and unpleasant company". "She made it clear to him that she wanted it to end towards the end of May," Mr Abell said. Rory continued to harass the woman and became "unstable and tempestuous," he added.
By July, the victim "made it clear to him the relationship was over". She asked him to delete intimate photos of them together on his phone. Rory sent letters to her husband.
Rory had an affair with an unnamed woman for five years
The harassment offences took place between June 2015 and August 2016, the court heard.
After the hearing, Rory's solicitor Nick Barnes read out a statement on his client's behalf, saying: "This has been a dark time and thankfully it's now over.
"I wish to thank the judge and to apologise to my wife and family and to thank them for their incredible support during this time. I now want to move on with my life. Thank you."