BOSTON (AP) — A former FBI agent has been sentenced to two years of probation for lying during the 2013 racketeering trial of Boston gangster James “Whitey” Bulger.

Robert Fitzpatrick was sentenced Friday by a federal judge in Boston under the terms of a plea agreement.

READ MORE: Police Searching Woods In Abington For Missing 5-Year-Old Elijah Lewis

The 76-year-old Fitzpatrick pleaded guilty to perjury and obstruction of justice earlier this year for lying and overstating his professional accomplishments, including claiming he was the first officer to recover the gun used to assassinate Martin Luther King Jr. in 1968.

READ MORE: I-Team: Correction Officers Suspended After Vaccine Exemptions Were Rescinded

Fitzpatrick testified that he tried to end the FBI’s corrupt relationship with Bulger, who worked as a criminal informant while leading a gang responsible for numerous killings. Prosecutors say Fitzpatrick lied in part to boost sales of a book he co-authored.

MORE NEWS: 'Too Much That Can Go Wrong': Local Movie Prop Master Explains Dangers Of Guns On Set

Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.