A man convicted in the carjacking and beating of a pregnant woman two years ago has been sentenced to 10 years' jail time and an eight-year driving ban.

Edward Joseph Biwer was sentenced Thursday for offences including attempted robbery, use of a firearm, assault causing bodily harm and dangerous driving. Following sentencing, Biwer called the judge a "f—king goof," and continued to swear as he was taken into custody, the Crown said in a statement.

The judge sided with the Crown's sentencing recommendation of a decade behind bars, and Biwer will serve six years and eight months with credit for time served. In addition to jail time, Biwer was given a lifetime firearm ban and ordered to pay a victim surcharge of $1,400.

The defence sought a six-year sentence, and called the Crown's recommendation heavy-handed. His attorneys said he is remorseful, and suffered from drug addiction that began at an early age.

Crown Prosecutor Winston Sayson said the sentence should serve as a deterrent to those who commit violent crimes while under the influence of drugs.

"The crimes committed by Biwer have caused great harm and trauma to many innocent victims and their families," Sayson said in a statement.

"This sentence is an apt denunciation by the court of such senseless acts."

Biwer had been out of jail for less than two months when he tried to steal a woman's car in December 2014. He was strung out on drugs at the time, officials said.

Unsuccessful in the first attempted theft, he then set his sights on a truck parked outside a drug store, with a pregnant woman waiting inside.

He got in the truck and drove off with the woman, who says he violently beat her when she told him she was pregnant. The carjacker smashed into half a dozen vehicles on the Fraser Highway as the woman started to fight back.

"Right before the crash I had smashed his head into the window, grabbed onto the steering wheel with both hands and just pulled," she told CTV News in January. The truck flipped, and Biwer fled to a red SUV belonging to a couple who'd stopped to help. The couple's newborn was in the backseat, but was fortunately unharmed in the incident.

With files from CTV Vancouver's Michele Brunoro