Imagine volunteering for military service only to find out that the enemy is not on the battlefield, but within your own ranks. And if you complain, you’ll risk utter humiliation and your offender will walk free, retaining all rank and status.

That pervasive and destructive atmosphere has long clouded the military response to allegations of sexual assaults, and that attitude persists.

It has to change.

A recently released Defense Department study used an anonymous survey to estimate that about 26,000 people in the military were sexually assaulted in the 2012 fiscal year. That is a stunning increase from the already appalling 19,000 assaults estimated for the previous year.

Another Pentagon study showed that the military recorded reports of 3,374 sexual assaults last year, an increase from 3,192 in 2011. Those numbers are small compared with the enormous estimate, which highlights the problem of non-reporting by victims of sexual assault.

The environment is so toxic that even an officer in charge of preventing sexual assaults has been accused of a sexual offense. Only two days before the release of the Defense Department’s report, Air Force Lt. Col. Jeffrey Krusinski was arrested in Arlington County, Va., and charged with sexual battery. Krusinski is the officer in charge of sexual assault prevention programs.

Shameful and infuriating, this news has drawn an appropriate response from the president and members of Congress. President Obama isn’t taking any excuses. “The bottom line is, I have no tolerance for this. If we find out somebody’s engaging in this stuff, they’ve got to be held accountable, prosecuted, stripped of their positions, court-martialed, fired, dishonorably discharged. Period.”

But it’s not clear that the Pentagon is on board with zero tolerance. Gen. Mark A. Welsh III, the Air Force chief of staff, outraged observers last week when he seemed to dismiss the fact that sexual assaults are crimes of violence: “So they come in from a society where this occurs,” he told a Senate committee. “Some of it is the hookup mentality of junior high even and high school students now, which my children can tell you about from watching their friends and being frustrated by it.”

Sen. Kirsten E. Gillibrand, D-N.Y., is one of several lawmakers who have pledged to introduce legislation that would bring the change the military desperately needs. It would give military prosecutors, instead of the offender’s commander, the power to decide which cases to try. It would also abolish a commander’s post-trial powers.

While Defense Secretary Chuck Hagel has pledged to change the culture, he does not like the idea of taking military justice out of the current chain of command. Too bad. It might have prevented the ugly set of circumstances in which an Air Force senior officer recently reversed guilty verdicts in sexual assault cases.

Sen. Claire McCaskill, D-Mo., has acted correctly in holding up the nomination of the Air Force officer in question, Lt. Gen. Susan J. Helms, to be vice commander of the Air Force’s Space Command.

The Pentagon has promised to clean up the problem of sexual assaults before, without delivering. This shameful environment must end. Military men and women should not have to worry about fending off sexual predators within their own ranks, and then fear telling anyone about it.