WASHINGTON (AP) — As a U.S. Marine, Daniel E. DeSmit swore to live by a code of honor. Semper fidelis, always faithful. But DeSmit shattered that pledge repeatedly — directing dozens of live Internet videos of children having sex with each other.

DeSmit, a chief warrant officer and father of three, spent at least $36,000 viewing and producing child pornography over a span of six years. In emails examined by Navy criminal investigators, DeSmit described his preference for sex with prepubescent girls as "the best experience."

A military judge in January found DeSmit, 44, guilty of a litany of sex offenses and sentenced him to 144 years behind bars. But he'll serve just a fraction of that time. In an undisclosed pretrial agreement, the Marine Corps slashed his prison term to 20 years. When The Associated Press asked for the investigative report in DeSmit's case, the Naval Criminal Investigative Service rejected the Freedom of Information Act request on privacy grounds. The report was released only after AP appealed.

DeSmit's crimes are not all that uncommon. Neither is the misleading prison sentence.

An AP investigation found the single largest category of inmates in military prisons to be child sex offenders. Yet a full accounting of their crimes and how much time they actually spend behind bars is shielded by an opaque system of justice.

Child sex assaults committed by service members have received scant attention in Washington, where Congress and the Defense Department have focused primarily on preventing and prosecuting adult-on-adult crimes. And those steps were belated. Despite years of warning signs that adult sexual assault in the ranks was a persistent problem, it took a documentary film about the situation to shock lawmakers and military leaders into action.

Of the 1,233 inmates confined in the military's prison network, 61 percent were convicted of sex crimes, according to the AP's analysis of the latest available data, obtained through the Freedom of Information Act, known as FOIA. In just over half of those cases, the victims were children.

Since the beginning of this year, children were the victims in 133 out of 301 sex crime convictions against service members — including charges ranging from rape to distributing child pornography.

"This disturbing report exposes, once again, that our military's justice system has glaring and unacceptable failures," Rep. Niki Tsongas, D-Mass., said Wednesday of AP's investigation. Tsongas, co-chair of the congressional Military Sexual Assault Prevention Caucus, said she will be taking a closer look at what she described as "alarming findings."

The military justice system operates independently of state and federal criminal courts. The U.S. Constitution mandates a presumption of openness in civilian courts — trials are open to the public, as are court filings, including motions and transcripts, with exceptions for documents that have been sealed. Anyone can walk into any county or U.S. courthouse and ask to read a case file without providing a reason beyond curiosity. That openness is designed to provide accountability.

But visibility in connection with military trials is minimal. While brief trial results are now made public, court records and other documents are released only after many FOIA requests, appeals and fees, and often months of waiting. While military trials are technically "open," as are civilian trials, they take place on military bases, which are closed to the general public.

Over the past five months, AP has filed 17 separate requests under the FOIA for documents from more than 200 military sexual assault cases that ended with convictions. At the time this story was published, the military services had provided complete trial records for five cases and partial records for more than 70 others.

Under military law, children are defined as "any person who has not attained the age of 16 years." Victims aged 16 and 17 are counted as adults, which is consistent with age-of-consent laws in most states.

Data on sex crimes committed by civilians is not comparable to the conviction and confinement figures maintained by the Pentagon. But a 2013 study of child maltreatment by the U.S. Health and Human Services Department and Pentagon data indicate incidents of child sexual abuse are higher in the general population than among military families.

Asked why the biggest group of military inmates is behind bars for sex crimes against kids, Defense Department officials said judges and juries view these crimes as intolerable and are more likely to impose harsher prison terms. Adult sexual assault cases can be more ambiguous, particularly if alcohol is involved, and punishments can vary. They also said military prosecutors pursue verdicts in cases their civilian counterparts would never take to court, and the confinement numbers reflect that commitment.

Air Force Col. Chuck Killion, director of the Air Force judiciary, said that since 2008 the Air Force has secured convictions in 199 out of 223 child sexual assault cases — an 89 percent rate.

"It's not as if there are child sex crimes being swept under the rug somewhere," Killion said. "We simply don't do that."

____

BEHIND AN OPAQUE LEGAL SYSTEM: SHOCKING CHILD ABUSE

While child sex crimes may not be swept under the rug, the Defense Department does not make it easy for the public to learn about them.

After DeSmit's conviction in January, the Marine Corps summed up the case in two sentences.

"At a General Court-Martial at Okinawa, Japan, Chief Warrant Officer 4 D. E. DeSmit was convicted by a military judge alone of conspiracy to commit sexual assault and rape of children, aggravated sexual abuse of a child, sexual abuse of a child and possession of child pornography. The military judge sentenced the accused to 144 years of confinement, a reprimand and dismissal," a summary of the court-martial released by the Marine Corps read.

And that's all the service would have said publicly, had the AP not pressed for more.

The Naval Criminal Investigative Service initially said releasing its 198-page investigative report on DeSmit would constitute "an unwarranted invasion of personal privacy." The AP appealed the denial, and the Navy judge advocate general's office overruled NCIS, declaring the agency's decision overly broad and instructing it to release all material within the report not exempted from disclosure. NCIS investigations, which include evidence from the crime scene and witness interviews, are not court documents but are used by military leaders to decide what action to take against a service member.

NCIS blacked out all the names in the report, including DeSmit's. The AP identified him by the dates and events left in the document.

The effect of the policy is an enhanced degree of privacy for convicted service members not available to civilian defendants. Most records from criminal cases in state and federal courts are public, although the privacy of the victims of violent crime is protected.

DeSmit bragged about having sex with 8- and 9-year-old girls while on vacation in Thailand. He was emailing and chatting online with a Filipino woman, Eileen Ontong, who'd supplied him with child pornography for the past six or seven years, records show. He was planning a similar two-week vacation to the Philippines.

In these online chats, DeSmit told Ontong what he wanted from the prepubescent girls she would provide him when he visited. He described his preferred ages and body types.

"No chubby for me," DeSmit wrote. "And no really skinny for me." Ontong assured him a particular girl he'd requested was on a diet in preparation for his visit.

DeSmit was concerned about what sex acts these children would perform with him when he visited, according to the records. DeSmit said he wanted Ontong to ensure that he had sex every day.

"It has to happen," he wrote.

DeSmit joined the Marine Corps in 1991. He is from Kalamazoo, Michigan, has been married twice and has three children. He was stationed in California, North Carolina, Virginia, Afghanistan, Bahrain and Japan.

The investigation into DeSmit began in December 2012 when a civilian Navy employee was caught with thousands of sexually explicit images and videos of children. Investigators tracked his payments through a Western Union account to Ontong. She was considered the "queen" of child pornography in Cordova, a poor fishing town in the central Philippines.

It wasn't long before investigators learned DeSmit was the biggest single customer of Ontong's operation, according to a U.S. official familiar with the case. The official, who confirmed DeSmit's role and other aspects of the case, was not authorized to speak publicly and spoke on the condition of anonymity.

DeSmit "directed" about 80 live videos, asking for certain children by name and instructing them what to do. In one video, two children were asked to kiss each other on the mouth and breasts, according to the case file. DeSmit told investigators he would masturbate while watching these videos. One child said she was paid $3.41 per show.

Ontong was arrested in May 2013, and her trial in the Philippines is ongoing. The National Bureau of Investigation — the Philippines' counterpart to the FBI — said there were about 30 victims altogether, and a few were as young as 3.

One of the victims was ordered to participate by her mother. "I was shy and nervous," the victim said in a sworn police statement. "I hesitated to follow the instructions of my mother but my mother would remind me that I should do it to pay our debts."

DeSmit eventually canceled his trip to the Philippines.

Officials said his crimes discredited the Marine Corps. "No one expects Marines to engage in this type of conduct. It degrades our standards and the public's perception of our service," one of the court records said. "Our foreign allies would lose respect for our service upon learning that one of our most experienced officers was involved in this type of conduct while deployed on their soil in furtherance of U.S. policy."

____

PUNISHMENTS NOT WHAT THEY SEEM

The most significant detail missing from the Marine Corps' brief public summary was the pretrial agreement limiting DeSmit's prison time to 20 years, not 144 as the service initially said. He pleaded guilty to 18 counts, including conspiracy to commit rape of a child.

He'll do even less time if he is eventually paroled. In the military justice system, DeSmit could be released from prison after serving one-third of his term.

In federal courts, judges have the final say in determining the length of a sentence. Parole wouldn't be an option either. It was eliminated for federal defendants convicted of crimes after 1987.

Both the military and civilian court systems make use of plea deals before cases go to trial. Defendants gamble that a guilty plea will lead to a lesser sentence than they might get from a judge or jury. But military judges are not allowed to review the pretrial agreement before sentencing, and their decisions are not binding. The defendant always gets the lesser sentence.

In civilian courts, by contrast, the judge is privy to terms of any pretrial agreement, called a plea bargain, and has the final say. A judge could decide the agreed-upon sentence is too lenient and impose a different one.

DeSmit is one of dozens of sex offenders who have received pretrial deals, according to AP's analysis of the summarized results of courts-martial released monthly by three of the four military services — the Air Force does not disclose the existence of pretrial agreements in its summaries. Since the beginning of July alone, 31 soldiers, sailors and Marines were convicted of sex crimes against children. In 20 cases, there were pretrial agreements.

Before July, the Army, Navy and Marine Corps didn't mention the plea deals. And as DeSmit's case demonstrates, the omissions can dramatically misrepresent the actual prison sentence.

At Parris Island, South Carolina, Marine Corps Gunnery Sgt. Ike V. Chisholm was convicted in April of raping and sexually abusing a child, according to the court-martial summary. Chisholm was sentenced to 30 years confinement, the summary said.

But under the terms of a pretrial deal not mentioned, Chisholm's confinement is limited to 10 years. The Marine Corps disclosed the agreement in a response to questions from the AP, which learned of Chisholm's reduced sentence through his attorney.

Army Spc. David L. Benitez pleaded guilty in July to sexual assault of a child and his prison term was reduced by 15 years — from 25 to 10. Navy Seaman Apprentice David Olson got three years behind bars instead of nine after he pleaded guilty in September to sexual abuse of a child and unlawful entry.

Before 2013, the services didn't even publish trial outcomes in a centralized way. The Navy was the first to make the monthly results available, a move it said would lead to greater transparency.

However, there is no uniform method for releasing the summaries, which provide the names of the convicted, the dates of conviction, lengths of sentences and a brief description of the crimes. The Army publishes only three months of trial results at a time. When the September results were posted, the June results were removed and were no longer accessible online.

Documents from court-martial proceedings, such as the charges, courtroom transcripts and pretrial agreements, are available only through the FOIA, a potentially time-consuming process with no assurances the requested documents will be released.

Conversely, records from most federal court cases are available online through the Public Access to Court Electronic Records system, known as PACER. The military does not have a comparable repository.

"I can sit at my computer in New Haven and find out what was filed five minutes ago in a case in federal district court in Seattle," said Eugene Fidell, a former Coast Guard judge advocate who teaches military justice at Yale Law School and is a practicing attorney. "But to get copies of motions filed last week in a general court-martial at Fort Lewis would take months if not years, while the Freedom of Information Act wheels ground along."

In October, a military appeals court denied Fidell's request to make public key documents from the case of one his clients, Sgt. Bowe Bergdahl, who walked off his post in Afghanistan and was captured by the Taliban.

Transparency, Fidell said, is crucial in democratic societies to ensure the public has confidence in the administration of justice — regardless of whether it's a civilian or military court.

"Keeping transparency at a minimum sends a signal that these cases are nobody's business," he said.

The case of Army Pvt. Jameson T. Hazelbower, convicted of sexually abusing children, illustrates that point.

Hazelbower went AWOL from his Army unit in Kentucky while he was a suspect in two separate investigations of sexual abuse of minors. The military's warrant for his arrest called him a violent sexual predator and an escape risk.

When local police arrested Hazelbower last year in Winnebago, Illinois, he was in his car with a girl, barely 14, according to the Winnebago County sheriff's office. Authorities quickly discovered he was also pursuing another teenage girl. Hazelbower pleaded guilty in the civilian system to aggravated criminal sexual abuse and indecent solicitation of a child, both felonies, and received 30 months of probation.

Illinois authorities then returned Hazelbower to Fort Campbell, Kentucky, where he was convicted in May of child rape, possession of child pornography, sexual abuse of a child and other charges. For those crimes, he was sentenced to 50 years in prison.

Six months later, the details of Hazelbower's court-martial are being withheld from the public. That's because even after a military judge or jury renders its verdict, the sentence must be approved by a senior military officer. During that period, no records from the trial are permitted to be released, said Valerie Florez, the freedom of information and privacy officer at Fort Campbell.

The withholding of Hazelbower's trial records amounts to an embargo of information about a criminal case long after it has been adjudicated. And even then, the release of records is governed by a slow-moving review process.

Lawyers also struggle to get records. Russell Butler, a civilian attorney and executive director of the Maryland Crime Victims Resource Center, recalled a case in which he represented the victim of a crime committed by a service member. The military prosecutors and defense counsel objected to Butler receiving court orders, motions and pleadings. He got the material only after he convinced the judge there is no military exception to the First Amendment's right of access to criminal court documents.

"The military's practice of denying timely access to court-martial records is repugnant to the United States Constitution," Butler said.

____

LIMITS OF OVERSIGHT

In the past, it has been the voices of victims that have changed the way the Defense Department investigates and prosecutes sex crimes.

Media reports triggered a Pentagon investigation that determined 83 women were sexually assaulted at a 1991 gathering of Navy aviators in Las Vegas. The lewd, booze-filled event would become known by a single word, Tailhook, and the ensuing outcry ended the careers of the seagoing service's top two officials.

The latest uproar over sex crimes in the ranks was ignited by a 2012 documentary, "The Invisible War." In the film, adult sexual assault victims contended in vivid terms that military leaders ignored the crimes and instead punished those who reported them.

For members of Congress from both political parties, the documentary hit hard. It identified the problem graphically, leading to sweeping alterations in military law and policy aimed at preventing sexual assaults.

But many lawmakers aren't satisfied and are pushing for even more reform. In June, 50 senators voted for a bill that would have made a major change to the military justice system despite the Pentagon's opposition. But the effort was short of the 60 votes required but this was enough to trigger doubts on Capitol Hill about the military's commitment to stopping sex crimes.

In fact, the military's focus has been on adult-on-adult crimes, not children, said retired Col. Don Christensen, the Air Force's former chief prosecutor and the president of Protect Our Defenders, a nonprofit advocacy group.

"This has been under the radar," Christensen said. "When DOD talks about sexual assault, it talks about people in uniform."

Sexual assault is considered a chronically underreported crime. Victims often feel they won't be believed, fear retaliation, or may not want their attacker punished.

Children are most often sexually abused by people they know or trust and that makes it difficult for them to tell another person what happened, said Howard Fradkin, a psychologist and former president of MaleSurvivor, a support group for men who were sexually abused as children.

A father sexually abusing a child might say, "If you tell, you know your daddy's going to get fired from the military," Fradkin said. "Whether or not that's true, that's all you have to say to keep them silent."

A victim of Navy Petty Officer 1st Class Darren Yazzie kept her abuse "bottled up" for several years until an alert middle-school counselor noticed her sitting by herself at lunch time, visibly upset. The counselor took her to an office where she recounted how he "would crawl into bed and have sex with her," according to the NCIS investigative report on Yazzie. His name was blacked out of the report released by NCIS, but the AP was able to identify him by information in the document that matched his case.

She wrote messages on notebook paper and her bedroom wall. "I (expletive) Hate you," read one. "Die ...," read another, with the name redacted.

After the Navy began investigating, Yazzie went AWOL from the ship he was assigned to in San Diego, the guided missile cruiser USS Princeton. He was arrested in Arizona and returned to the Navy for trial. Yazzie was convicted in January of rape of a child and sentenced to 17 years. There was no pretrial agreement.

A leading critic of the Pentagon's treatment of sexual assault, Sen. Kirsten Gillibrand, D-N.Y., called the AP's findings about the number of child victims alarming and disturbing.

"There are just huge red flags and huge concerns about where justice is not being done," Gillibrand said. "This is just the latest example of DOD's lack of transparency on the issue of sexual assault."

___

Associated Press writers Jim Gomez in Manila, Philippines, Julie Watson in San Diego, and researcher Monika Mathur in Washington contributed to this report.