MOUNT VERNON — Terrance D. Williams pleaded guilty Tuesday to armed violence in connection with a traffic stop incident earlier this year and was sentenced to 25 years in prison.