A TWITTER troll who posted a message stating that “a dead MP is a good MP” just hours after Jo Cox was shot dead outside her constituency surgery has avoided a jail sentence.

Craig Lawson sent the “grossly offensive” message on the social networking site on June 17, less than 24 hours after Mrs Cox died.

Lawyers for Lawson claimed the message was not sent in response to the murder, but was a co-incidence.

But a sheriff said it was “extraordinarily hard to accept” given the blanket media coverage of her killing – and that the offence “fully justified” a prison term.

However, Lawson was given community service as “the very MPs he vilified” passed laws meaning prison could be imposed if it was the only option.

Lawson’s message was spotted by political activist Gregor McAbery, who was so appalled he contacted police who traced Lawson at his home in Springfield, Fife.

Lawson, 24, pleaded guilty to the charge that was made against him.