A councillor has walked free from court after magistrates said a tweet he aimed at Labour MP Sadiq Khan was "very stupid" but not "grossly offensive".
James Buckley, who sits on Rugby Borough Council, sent a message on the social media site comparing Mr Khan's constituency office with a corner shop.
Mr Buckley, 61, was suspended from his local Conservative group and said he had gone through "four months of hell" after the tweet was picked up by the press, and legal proceedings started against him under the Communications Act.
He told the court he sent the tweet as he was "bored" while his wife was shopping in a nearby haberdashery in Tooting, south London, on a Saturday afternoon last October.
Addressing the magistrates, he said he was trying to compare Mr Khan's "slightly run down" office on Balham High Road with the "plush" offices of the current mayor of London Boris Johnson.
Sadiq Khan is Labour candidate for mayor of London.
He said: "I just did it trying to be stupidly funny, disastrously."
The tweet was deleted ten minutes after it was first sent, defence solicitor Mohammad Farooq said.
Mr Buckley said there was no racially abusive undertone to his tweet and that he had sent a letter to Mr Khan to apologise for any offence his message may have caused.
Magistrate Irene Stark said: "We all agree it was a very stupid thing to do and you admitted this yourself by deleting it.
"We do not believe that this was grossly offensive."
He was cleared of one charge of sending an offensive message at Leamington Spa Magistrates' Court on Friday.
Speaking after the verdict, Mr Buckley said he was pleased at the ruling and added: "Why was this case brought to court?"