CALGARY -- A judge has sentenced a former soldier to four years in prison for his plot to attack a Veterans Affairs office saying his crimes were "chilling in their meticulous planning".

Glen Gieschen, 45, is getting 18 months of credit for time served in custody. He is also banned for life from owning any weapons.

He dabbed at tears while Judge Sean Dunnigan outlined his reasons for the sentence and the circumstances of Gieschen's crimes.

"If Mr. Gieschen had followed through with all or part of his plan, the results would have been catastrophic for those working in the Bantrel building and for first responders who would have come upon a nightmare of death and destruction," Dunnigan said Tuesday.

"Unlike our neighbours to the south, Canada does not typically deal with heavily armed, aggrieved individuals seeking to avenge perceived slights to advance their political agenda," he said.

"We also don't generally see individuals with access to an array of sophisticated weaponry or improvised explosive devices. This is a very peculiar case. It is also a very serious one."

Gieschen pleaded guilty in November to possession of a firearm, possession of a prohibited weapon and possession of a weapon.

During Gieschen's arrest in January 2014, police recovered firearms, body armour, possible bomb-making materials, schematics of a downtown Calgary skyscraper and a plan to attack the seventh-floor federal offices.

Court was told that he had a beef with the military over coverage for multiple sclerosis he believed was caused by a flu shot he received while in the military.

He was arrested after his wife called police because she was concerned that he might be suicidal. He was taken to hospital for treatment under the Mental Health Act.

A victim's impact statement was read in court on behalf of the 26 employees of the Veterans Affairs office.

"We struggle with nightmares and constant vigilance for fear of being a target," read security guard Michel Fay.

"We ask the court to understand the enduring and significant impact this event has had on all of us and our families, and consider the gravity of this man's intention to attack an entire office of federal government employees."

When he was arrested at his parents' rural home west of Calgary, Gieschen was dressed in camouflage pants and was sleeping with a duffel bag near his head.

The bag contained a .40-calibre semi-automatic handgun that was loaded with a full magazine. Police also recovered a .308-calibre rifle, a ballistic range-finder scope for shooting long distances, a laser sight for shooting at close range, night-vision binoculars and 1,000 rounds of ammunition.

There were also jugs filled with chemicals, empty suitcases with metal linings, 16 black sticks with a protruding fuse, carpenter nails, threaded pipes and six tubes of camouflage face paint.

At his sentencing hearing, Gieschen told the judge he took responsibility for his "irresponsible" actions.

Dunnigan said he believed the expression of remorse was sincere.