Two men are beginning jail terms having been found guilty of possession of a firearm with intent to endanger life.
Dean Edwards, 39, and Michael Cooper, 40, were found guilty following a trial at Chelmsford Crown Court which concluded on Wednesday and were both sentenced to prison terms.
Edwards, from Convent Close, Braintree was jailed for 15 years while Cooper, from Russell Road, Clacton was jailed for six.
Damage was caused to the wall of the TP Sports Bar in Queen Street, Colchester, during the early hours of Saturday, September 15, 2012.
Three shots were fired in the vicinity of a member of security working on the door of the bar.
DI Stephen Jennings of Colchester CID said: "The result of the reckless and extremely dangerous actions of these two men could have been far worse. We could have been dealing with a murder.
"Thankfully these cases are extremely rare and I hope the outcome today demonstrates how seriously Essex Police takes these matters and will not tolerate this kind of behaviour.
"I am pleased these two dangerous men have been taken off the county's streets."