Belfast Crown Court heard how 14 shots were fired by a gunman in the Brompton Park area, in the wake of serious violence which broke out after a Twelfth of July parade passed the Ardoyne shops.
The gunman has never been apprehended.
But Thomas Stewart Patrick McWilliams, 48 and from Northwick Drive in the city, pleaded guilty to possessing the weapon with intent to endanger life on July 13 2012.
It was the prosecution case that he used a stolen car to remove the gun from the scene of the riot.
On Tuesday, he appeared in the dock to be told that he will have to serve six years in jail and spend a further six years on supervised licence.
The court heard that McWilliams had a "relevant record for terrorist offences" and that he had been sentenced to life imprisonment in March 1995 for murder.
He was released on licence in July 2000, but that licence was later revoked by the Secretary of State.
McWilliams appeared alongside 59-year old Michael Joseph Gorman, from Estoril Court in Belfast.
Gorman, who also served a life sentence for a terrorist murder and was released on licence in December 1995, pleaded guilty to assisting an offender.
It was the prosecution case that he let McWilliams into the Flax Foyer building where he worked, for the purpose of concealing the weapon for a time.
For his role, Gorman was handed a five-year prison sentence, suspended for five years.
A senior prosecutor told the court that police were pelted with missiles, including petrol and blast bombs, on the Twelfth - before the shots were fired from the crowd at about 12.20am on 13 July.
Fortunately, neither the police vehicles nor the officers were struck by any of the shots.
A police helicopter, equipped with CCTV recording technology, recorded the sequence of events and captured the gunman withdrawing back into the crowd after firing the shots from a semi-automatic.
The gunman then made his way to a parked Citroën car and was seen putting the weapon in the rear of the vehicle before walking away.
The court heard that the vehicle was driven by McWilliams to Flax Street and that when he arrived at the Flax Foyer building - which provides accommodation to young people - he took a holdall from the rear of the car.
The prosecution said that Gorman let McWilliams into the building around five minutes after the shots were fired, and the holdall was left behind a fridge in the kitchen.
When police later seized CCTV footage from the building, it emerged that cameras had been turned off for most of the period of time when McWilliams was in the premises.
The CCTV system was deactivated for a second time from around 12.41am to 12.50am, which is when the Crown believes that the weapon was removed from the building - as it was not recovered during a subsequent police search.
Both McWilliams and Gorman were arrested and, during interviews, both men denied membership of a prescribed organisation.
McWilliams initially denied involvement and gave 'no comment' answers, while Gorman told officers that he had been threatened and was told to turn off the CCTV system.
A QC representing McWilliams said that his client, who plans to marry his partner whilst in custody, "wants to resume his life after he has served his sentence".
Pointing out that, during the riot, the gunman fired shots in the air and over the heads of the crowd, the QC also told the court that McWilliams' licence "hasn't been revoked - it has been suspended".
A defence barrister for Gorman told the judge that there was "no evidence he knew about what was in the bag or looked inside it", but rather that his culpability was on his willingness to allow the premises to be used.
Passing sentence, Judge Corinne Philpott QC told McWilliams: "You have shown absolutely no remorse and the only thing that you are concerned about is yourself and your family."