A football fan forced a train to make an emergency stop at Perth following an argument.
Callum Stewart was returning from a Hearts v Hibs game when an argument broke out.
Train staff asked police to attend at their final destination of Dundee, later requesting an emergency stop at Perth as the situation escalated.
The 22-year-old, of Roundhill Road, St Andrews, admitted engaging in behaviour likely to incite public disorder on a train between Edinburgh and Perth by shouting, swearing and brandishing a bottle on February 7 last year.
Sheriff William Wood said the offence was made more serious by the unscheduled stop and ordered Stewart to carry out 120 hours of unpaid work.