A man who was in Derry to attend the Lundy's Day parade told police he did not want 'to go past the Fenians'.
Philip Storey, 24, of Seacon Road in Ballymoney, admitted being disorderly in the city on December 7 last year.
The court heard that police were on duty in the Bishop Street area at around 5pm when the defendant approached them and asked for directions to the train station as he did not want to pass 'the Fenians'.
Police warned him about that sort of language but he made other sectarian comments.
He was advised again about his behaviour but persisted and swore at police.
At one stage a child nearby was sent to be alarmed at his behaviour.
A defence solicitor told the court that his client wanted to apologise and 'was ashamed of his behaviour'.
He said Storey accepted he had behaved 'irresponsibly and wrongly.'
The solicitor said that Storey had consumed alcohol on the day in question but was now addressing his alcohol issues.
He added it was a case of 'alcohol in wit out.'
Deputy District Judge Anne Marshall said this 'behaviour was absolutely atrocious' especially for someone coming to the city to watch a parade.
She told Storey that the police 'have a difficult enough job to do without this.'
Stressing that 'actions have consequences' she told Storey it was going to be a very expensive lesson.
Storey was fined £300.
Subscribe or register today to discover more from DonegalLive.ie
Buy the e-paper of the Donegal Democrat, Donegal People's Press, Donegal Post and Inish Times here for instant access to Donegal's premier news titles.
Keep up with the latest news from Donegal with our daily newsletter featuring the most important stories of the day delivered to your inbox every evening at 5pm.