Agreement will avoid a second trial after conviction last month