A retired battalion sergeant major who was portrayed in the HBO miniseries "Generation Kill" was sentenced to 10 years in prison Wednesday for a sex offense involving a minor.

Retired Sgt. Maj. John Joseph Sixta, the former top enlisted leader of 1st Reconnaissance Battalion, pleaded guilty in Yuma Justice Court in Arizona to a sexual abuse charge for a case involving the child of a family he had befriended.

"He took advantage of the little girl by befriending the family" the prosecutor, Jim Eustace, said.

Sixta's attorney, Julie McDonald, said her client entered a guilty plea on that charge in order to drop other charges of sexual contact with a minor and molestation of a child.

Due to the nature of the crime, Sixta will serve all 10 years of the sentence and will not receive credit for good behavior, McDonald and Eustace said. Sixta was taken into custody in Arizona on July 2.

Sixta faces an additional charge in California. In June, prosecutors in Riverside County, California, charged him with committing a lewd act on a child under 14 years old. A warrant was issued on June 25. Riverside is about 50 miles northeast of Camp Pendleton, where Sixta's former battalion is headquartered. Lawyers said the alleged victims in the California case is different from the victim Arizona case.

McDonald and Eustace said California authorities can deliver a writ of habeas corpus to have Sixta transferred to Riverside officials to face charges there. McDonald said the time her client spends in California jail during trial will count toward his 10 year sentence in Arizona. If he's convicted and sentenced in California, he could either serve the two sentences concurrently, or he could serve his time in California after he completes his sentence in Arizona.

Before he was arrested, Sixta worked for the Military Freefall School at the Yuma Proving Ground, an Army facility. He resigned on July 1, an Army Special Operations Command spokeswoman said in July.

× Fear of missing out? Sign up for the Marine Corps Times Daily News Roundup to receive the top Marine Corps stories every afternoon. Thanks for signing up. By giving us your email, you are opting in to the Marine Corps Times Daily News Roundup.

Sixta was played by actor Neal Jones in the seven-part HBO miniseries "Generation Kill." The show was based on 1st Reconnaissance Battalion during the invasion of Iraq .