BAGHDAD, Iraq (CNN) -- An American soldier in Iraq has been sentenced to two years in military prison on child pornography charges, the U.S. military said Tuesday. At a general court-martial Monday at Baghdad's Camp Victory, Army Pvt. James R. Bickerstaff pleaded guilty to attempted possession of child pornography and communicating indecent language to a child under 16. Bickerstaff also received a bad-conduct discharge. The soldier was stationed at Fort Riley, Kansas, in August 2006 when he "engaged in a discussion with a 12-year-old girl in an attempt to initiate physical contact of a sexual nature," the military said. In April and May, he downloaded pornographic videos to a personal laptop and an iPod and attempted to download child pornography, the military said. Bickerstaff is with Charlie Company, 1-16th Infantry Battalion, 787th Combat Service Support Battalion, 507th Corps Support Group, at Al Asad Air Base. E-mail to a friend .
Soldier stationed in Iraq convicted in court-martial . Private solicited sexual contact with girl, 12, military says . Soldier gets two years in military prison, bad-conduct discharge .