The 49-year-old Austrian, a Swiss resident, was caught travelling on a bus without a ticket in February 2013.
Confronted by fare inspectors, the man refused to cooperate or identify himself and absconded when inspectors called police to the scene.
Police officers then gave chase, before the Austrian pulled out a pistol and fired five shots.
Fortunately, no one was injured.
The man eventually barricaded himself inside the home of a retired couple.
After threatening the pensioners with his weapon, he stole the woman's bicycle and continued his escape on two wheels.
Police tracked down the man some hours later and arrested him.
In court in Zurich this week the 49-year-old claimed he had the weapon with him because he was planning to sell it to another man.
He was under the influence of drugs and alcohol, he added, and acted out of fear and panic, with no intention to hurt anyone.
The court found him guilty of multiple attempted homicide, multiple counts of endangering life and liberty, as well as weapon-related offenses.
He was sentenced to 12 years in prison and outpatient therapy for addiction issues.