Prosecutor Diane Williams told Caernarfon magistrates’ court that the Facebook “event” was seen by a woman who had worked previously at a shop with Jones. She reported it to her supervisor and police were alerted.

The prosecutor said Jones told police it was “a moment of stupidity” which he regretted.

Defence solicitor Deborah Tennant-Davies said Jones had apologised for his behaviour and feared a prison term.

“He didn’t think it would be taken seriously and the matter was only on Facebook for 20 minutes,” she said.

The solicitor added that he told police: “I have acted completely out of character.

“I don’t know why I did that, I didn’t intend to incite any violence.”

Jones pleaded guilty to an offence under the Communications Act of sending the Facebook invitation on August 9.

Deputy district judge Mark Layton told him: “You sent a large number of people an invitation to start a riot.

“While you may not have thought people would take it seriously, your actions could have encouraged others to do so.”