CODY, Wyo. (AP) — A judge in Cody has sentenced a man to life in prison, with the possibility of parole, for the screwdriver stabbing death of his wife.

Under a plea agreement reached with prosecutors, Myron Friday, of Cody, pleaded guilty to first-degree murder on Tuesday in exchange for not facing the death penalty. Friday was scheduled to go to trial in May.

Friday gave a brief statement in which he apologized for the murder of his wife Julie Friday on Feb. 26, 2012.

The Associated Press reports that the crowded courtroom devolved into an ugly scene after the hearing concluded with the two sides of the families yelling expletives at each other. Police kept the two sides separated.