MADISON, Wis. (AP) - A former juvenile court judge in Wisconsin has reached a deal with prosecutors to resolve a host of child pornography charges filed against him earlier this year. Court records show that former Milwaukee County Children's Court Judge Brett Blomme agreed to plead guilty to two counts of distributing child pornography in federal court in Madison, the Milwaukee Journal Sentinel reported Friday. Each count carries a mandatory minimum sentence of five years in prison. The deal would resolve seven child pornography counts against him in state court. Each of those counts carries a maximum 25-year prison sentence. According to a criminal complaint, the state Department of Justice began investigating Blomme in February after receiving a tip from the National Center for Missing and Exploited Children that he had uploaded child pornography through the Kik messaging application 27 times in October and November. He was charged in state court in Dane County in March. A federal grand jury indicted him in May. The state Supreme Court barred Blomme from serving as a judge after he was charged in state court. Blomme's attorney, Chris Van Wagner, said he's trying to schedule a date in September for Blomme to enter his pleas. "He's ashamed and embarrassed," Van Wagner told The Associated Press by phone. "He wants people to forgive him, which isn't easy. He just asks that people remember that nobody is as bad as their worst decision or as good as their greatest victory."