KITCHENER -- A Cambridge man shot by a police officer in Kitchener almost three years ago has been sentenced following a sudden guilty plea.

On Wednesday, Maurice Rivard was sentenced to 24 months in prison. He only has to serve 10 more months because of time served.

The day before, the man admitted to attempting to disarm a police officer, assaulting the officer by threatening him with a taser, and impaired driving.

The plea came after hearing testimony from the officer who stopped Rivard's car and the witness who called 911 with an impaired driving complaint.

The court heard that the witness called police in March 2017 to report a drunk driver.

Robert Prentice of Waterloo Regional Police testified that Rivard quickly got out of his vehicle and yelled an obscenity at him, questioning why the officer pulled him over.

The officer told the court he tried to get out of his cruiser but realized it was still in drive.

Prentice said he put the cruiser in park and was half inside and half outside of his vehicle when Rivard started pulling at his vest.

The pair struggled and Prentice said he grabbed his taser, at one point accidentally tasing himself in the process.

Court then heard that the officer lost his grip on the taser, which Rivard picked up.

Prentice testified he ran out of his vehicle to the front of the cruiser and when he turned around Rivard had the taser pointed at his face, that's when the officer shot Rivard in the torso.

The officer told the court Rivard collapsed leaning against his vehicle and threw the taser on the ground.

As part of the plea, the crown dismissed the charge of simple assault and another impaired related charge.

The province's police watch dog investigated and cleared the officer involved.

Before Rivard pleaded guilty, he was seen crying and quite emotional.