York magistrates have given a community order to the man whose "bomb" tweet sparked a major security alert at a League One play-off.

Kieran Anthony Mark Richardson, 22, tweeted: "I wonder how many Portsmouth fans I can shoot" and referred to the Manchester Arena bombing the evening before the south coast club was due to host Sunderland in May, said Kathryn Reeve, prosecuting.

He claimed he had tickets to the home fans end, added that Fratton Park would go "bang, bang" and it was "going to be fun tomorrow".

Defence solicitor James Fenny said North Yorkshire Police's major crime unit arrested Richardson at his home within hours and held him in custody until after the match was over.

They didn't find any match tickets, weapons or bombing equipment.

Richardson had made the tweet in response to one offering £20 to anyone who could hit Sunderland fans.

"He had had a drink, he would not normally have reacted like that," said Mr Fenny.

Richardson had immediately regretted his actions and deleted the tweets but by then they had been copied and retweeted.

Richardson has a long list of previous convictions, including for malicious communications, said Mr Fenny, but had not done anything similar previously.

Magistrates told Richardson: "This is probably the most stupid thing you have ever done."

The only thing that saved him from a prison sentence was his efforts to rehabilitate himself since his last conviction two years previously.

They gave him a 12-month community order with 25 days' rehabilitative activities and a three-month curfew from 7pm to 6am every night.

He must also pay £85 prosecution costs and an £85 statutory surcharge.

Richardson, of Northallerton Road, Brompton near Northallerton, pleaded guilty to making a malicious electronic communication on May 15.

Last month, a separate bench heard how Portsmouth FC had tightened security at the match on the evening of May 16 on hearing about the tweets.

The match was drawn. Sunderland, who went through on aggregate, were beaten in the promotion final.