ROCKLAND, Maine — Two Maine State Prison inmates will be spending additional time in prison after admitting to assaulting a guard in 2014 with a handmade knife.

Roscoe Sargent, 42, and Tyler D. Uehling, 26, each pleaded guilty Tuesday in Knox County Unified Court to assault on an officer. In addition, Sargent pleaded guilty to possession of prison contraband — the shiv — and Uehling pleaded guilty to criminal mischief for damaging a computer screen.

According to the criminal complaint filed in court, the guard was attacked at the prison in October 2014 with a toothbrush that had a blade attached to it.

Assistant District Attorney Jeffrey Baroody said the guard was not injured because he was able to block the attempted blow by Sargent. Uehling was charged because he caused a diversion to give Sargent the opportunity to attack the guard, according to Baroody.

Uehling, who was sentenced in 2013 to 3½ years in prison for arson at Capitol Computers in Augusta, will serve an additional 27 months for his role in the attack on the guard.

Sargent, who was serving a 50-year sentence for murder, will spend an additional five years in prison. He has been incarcerated since his arrest in January 2003 for stabbing to death his 20-year-old pregnant wife, Heather Fliegelman Sargent at their home, in Bangor.

In 2013, Sargent was given an additional year in prison for attacking another inmate with a homemade knife he created from a piece of metal from a clipboard.