A man on a scrambler bike roared abuse at gardai and gave them the finger as he thought they were unfairly picking on him, a court heard.
Peter Moore (20) shouted the abuse in full view of a large group of children and he was arrested for his behaviour.
A judge sentenced the defendant to 10 weeks in prison, saying he was previously given two opportunities to do community service and he was still getting into trouble.
Moore, of Sutton Park, Sutton, admitted before Swords District Court to threatening and abusive behaviour.
The incident took place in River Valley in Swords shortly after 4pm on September 20.
Sergeant Paul Madden said Moore was seen by gardai who were on mobile patrol in the River Valley area, and he started shouting abuse at them, and making rude gestures at them, in front of a large group of young children.
The court heard that Moore has 18 previous convictions, mostly for public order offences.
Defence solicitor Fiona D'Arcy said Moore has apologised for his behaviour, which he realises was unacceptable, but that he was annoyed as he felt the gardai were picking on him.
Ms D'Arcy said Moore is working as a printer, and would lose his job and find it difficult to get a new one if he was sent to prison.
Judge Patrick Brady said Moore was given the benefit of community service twice previously.
He fined Moore €750 and sentenced him to 10 weeks in prison.