A former soldier handed himself into police for his "enraged" behaviour during a riot after his photograph appeared in the media, a court has heard.
Greg Edgar admitted he had retaliated after he was almost hit by a bottle on July 12 last year.
Belfast Recorder Judge David McFarland told Edgar that before the incident he had been acting in a perfectly lawful way.
However, he then involved himself in the Newtownards Roads riot, Belfast Crown Court heard.
Edgar (23), from Tower Street in the city, gave himself up after his picture appeared in the papers.
Solicitor Darren Duncan said if he hadn't, Edgar may not have been identified given his previously clear record.
Edgar told police that nearly being hit by a bottle as he walked home, "made me angry and I retaliated", prosecutor David McAughey told the court.
Edgar was one of two young men sentenced to two years for rioting yesterday.
Jonathon Burton (19) admitted involvement in what ended up as a sectarian incident in the city centre after a counter-protest against a rally on August 9 last year to mark the introduction of internment.
Judge McFarland told Burton, from Tennent Street in the city, that while he had a right to protest it must be lawful and there was a need for prison sentences to deter those who would want to engage in rioting.