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
How long did the soldier get in military prison? Where was the soldier stationed? What is the soldier convicted of? How many years does the soldier get? What is the girls age? What was the girl's age? What age is the girl in this story? What are the consequences for the soldier? Where were the soldiers stationed?
two years Fort Riley, Kansas, child pornography charges, two 12-year-old 12-year-old 12-year-old two years in military prison Fort Riley, Kansas,
question: How long did the soldier get in military prison?, answer: two years | question: Where was the soldier stationed?, answer: Fort Riley, Kansas, | question: What is the soldier convicted of?, answer: child pornography charges, | question: How many years does the soldier get?, answer: two | question: What is the girls age?, answer: 12-year-old | question: What was the girl's age?, answer: 12-year-old | question: What age is the girl in this story?, answer: 12-year-old | question: What are the consequences for the soldier?, answer: two years in military prison | question: Where were the soldiers stationed?, answer: Fort Riley, Kansas,