Former Illinois State Rep. Keith Farnham was charged Monday with using both personal and state-owned computers to trade hundreds of images and videos depicting child pornography and engage in graphic online chats in which he allegedly bragged about sexually molesting a 6-year-old girl.

The federal criminal complaint alleged that Farnham, 66, a Democrat from Elgin, possessed two videos depicting child pornography on a computer that was seized from his state office in Elgin a week before his abrupt resignation in March. Authorities also linked a Yahoo! email account used by Farnham to a online trading forum in which he chatted with other users about his sexual preferences, according to the charges.

“12 is about as old as i can handle,” Farnham allegedly said in one online chat in November, according to the charges. “i love them at 6 7 8”

Farnham – who twice co-sponsored bills in the House that toughened penalties for child pornography -- is scheduled to make his initial appearance at the Dirksen U.S. Courthouse on Wednesday.

When he resigned his seat on March 19, Farnham told the Tribune he was stepping down due to serious health concerns. A Navy veteran who ran a painting business in Elgin before running for office in 2009, Farnham said he is receiving treatment for bladder cancer and also struggles with pulmonary fibrosis, a condition that causes lung tissue to scar.

Farnham did not return calls for comment Monday. He faces up to 10 years in prison if convicted.

Former colleagues, meanwhile, reacted with shock Monday.

“Those of us who know him I don’t think would have suspected this,” said state Sen. Mike Noland, the Elgin Democrat whose district included Farnham’s former district.

Democratic Rep. Mary Flowers, a longtime advocate for children, called the charges “very serious.” But she said she wanted to withhold judgment, saying, “I don’t want to cast him off as being guilty until he’s been found guilty.”

According to the charges, the investigation began when homeland security agents received a tip from its Cyber Crimes Center that email address kimdavid5582@yahoo.com was being used to trade child pornography on the Internet.

A search of Yahoo! logs showed a series of graphic instant messenger conversations between last June and January in which kimdavid5582 allegedly chatted with three other users about sexual preferences and exploits, according to the charges. Authorities later traced the Internet usage to the Comcast account at Farnham’s home, according to the charges.

In one online conversation in November with a person identified only as “User A,” Farnham allegedly described in detail a sexual encounter with a 6-year-old girl.

In another chat a few weeks later, Farnham allegedly told User A, “i wish i had access to all the vids and pics ever made.”

Former Elgin mayor Ed Schock, who worked closely with Farnham on legislative issues, said Monday the charges were “almost beyond comprehension.”

“It’s hard to really get my head around,” Schock said.

Tribune reporter Stephanie Baer contributed.

jmeisner@tribune.com

rlong@tribune.com