A Massachusetts man accused of threatening to kill the jury during his first murder trial and slapping his lawyer in the face during the second has been sentenced to 18 years in prison as part of a plea deal.

The Telegram & Gazette reports that 37-year-old Janleer Povez of Worcester was awaiting a third trial in the 2008 death of a Westborough man before Thursday's sentencing. His 2010 conviction was overturned, and a 2015 retrial was cut short when Povez slapped his court-appointed attorney.