Before the trial, lawyers met in private with the judge, who later announced that a deal had been reached.