A former Illinois state lawmaker has pleaded guilty in a child pornography case.

Keith Farnham changed his plea Friday and faces at least five years in prison. Prosecutors say the 66-year-old Elgin Democrat sought and traded illegal images online.

He’s scheduled to be sentenced in March.