Saskatchewan MLA Lyle Stewart was attacked by a man wielding a pen. ((CBC))

A man who pleaded guilty to a number of charges in the violent carjacking of a Saskatchewan member of the legislature will serve four years in jail.

Clayton Friday was sentenced on Wednesday to a five-year term, but he was given credit for time already served.

Saskatchewan Party MLA Lyle Stewart, who represents Thunder Creek, was on his way into Regina early on Oct. 29, 2009, when he stopped to help a driver who appeared stuck in a ditch alongside a rural road at the western edge of the city.

The man turned on Stewart, demanding he surrender his car. There was a struggle but the MLA was able to gain the upper hand.

Stewart phoned 911 and restrained his attacker until police arrived. The encounter left Stewart with a few cuts from being attacked with a pen.

"I'm all right, just a cut on the back of the hand," he said at the time.

Friday, who was 45 at the time of the incident, was charged with armed robbery and assault and pleaded guilty in March.

He also pleaded guilty to previous charges, laid earlier in 2009, relating to drinking and driving. The sentencing judge took all the charges into consideration when determining the total time to be spent in prison.

Friday is from the community of Pense, Sask., which is a part of  Stewart's constituency. The village of 507 people is about 30 kilometres west of Regina.