WAUKESHA, Wis. (AP) — A homeless sex offender released in Waukesha after serving his time behind bars was arrested just a day later after he was found near an elementary school.

Forty-four-year-old Kenneth McDonald was convicted in 2005 for sexually assaulting two girls, ages 3 and 6. McDonald was released Tuesday with a tracking device. He was spotted walking near Hawthorne Elementary School in Waukesha and arrested Wednesday.

State law prohibits convicted sex offenders from residing near schools, playgrounds or other places where children gather.

(© Copyright 2016 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)