During his opening remarks to on a Senate panel Tuesday Gen. Martin Dempsey argued commanders should not be taken out of the process of combatting sexual assault in the military. (The Washington Post)

The nation’s military chiefs have told Congress in writing that they oppose or have strong reservations about a controversial bill that would reshape military law by taking sexual-assault cases out of the hands of commanders, setting up a likely clash with lawmakers who are pushing the idea.

In a rare joint appearance, the uniformed leaders of the Army, Navy, Air Force and Marine Corps, as well as the chairman of the Joint Chiefs of Staff, are scheduled to testify Tuesday before a Senate panel about what the Pentagon has described as an “epidemic” of sex crimes in the ranks. Lawmakers are floating a variety of bills to attack the problem but have not settled on a single approach.

The service chiefs, however, made clear in recent letters to the Senate panel’s leadership that they do not favor a leading proposal that would give uniformed prosecutors, instead of commanders, the authority to open criminal investigations into ­sexual-assault cases and bring them to trial. Such a change, they argued, would undermine the foundation of military culture by sending a message that commanders cannot be trusted to make good decisions.

“A commander is responsible and accountable for everything that happens in his or her unit,” Gen. James F. Amos, the commandant of the Marine Corps, said in a May 17 letter to Sens. Carl Levin (D-Mich.) and James H. Inhofe (R-Okla.), the Senate Armed Services Committee’s chairman and ranking Republican. “Victims need to know that their commander holds offenders accountable, not some unknown third-party prosecutor.”

Gen. Ray Odierno, the Army chief of staff, warned the senators in a May 20 letter that taking away commanders’ authority in matters of military justice “will adversely impact discipline and may result in an increase in the problems we seek to resolve.”

“Sexual assault remains an unacceptable problem for our military and society,” Odierno added. “We cannot, however, simply ‘prosecute’ our way out of this problem. At its heart, sexual assault is a discipline issue that requires a culture change.”

The chiefs’ stance puts them at odds with advocacy groups and a rising number of lawmakers who note that commanders are legally untrained and argue that they have failed to address a pervasive problem of sexual assault in the ranks. Last month, the Pentagon released a report estimating that the number of active-duty military personnel victimized by “unwanted sexual contact” had surged by about 35 percent in the past two years.

Sen. Kirsten Gillibrand (D-N.Y.) has introduced the bill that most worries the chiefs. It would give prosecutors, not commanders, primary responsibility for handling sexual-assault cases and many other serious crimes. The measure has attracted 20 co-sponsors in the Senate, including four Republicans, and has gained momentum as the military has grappled with a string of sex-crime scandals in recent weeks.

In an interview Monday, Gillibrand said the service chiefs’ reluctance to weaken commanders’ legal authority is inconsistent with their acknowledgment that most victims of sexual assault in the military do not trust their superiors to protect them or take their cases seriously.

“It doesn’t make any sense,” she said. “They have a very strong understanding that victims don’t want to report because they feel they’ll be retaliated against or they think their careers will be derailed.”

Gillibrand compared the chiefs’ resistance to their initial reluctance to get rid of the “don’t ask, don’t tell” policy that prohibited gay people from serving openly in the armed forces. That policy was repealed in 2011 and, contrary to some predictions, has been accepted by the rank and file without a backlash.

“Obviously, we’ve seen a pattern where changing the status quo in the military is difficult,” Gillibrand said. “But when we do . . . we have beneficial results.”

Gen. Martin Dempsey, Chairman of the Joint Chiefs of Staff, speaks during a Pentagon news conference about sexual assaults in the military, among other topics May 17, 2013. (Carolyn Kaster/AP)

The other military leaders who wrote letters last month expressing concerns about removing sexual-assault cases from the traditional chain of command were Adm. Jonathan W. Greenert, the chief of naval operations; Gen. Mark A. Welsh III, the Air Force chief of staff; and Army Gen. Martin Dempsey, the chairman of the Joint Chiefs of Staff.

“Removing commanders from the military justice process sends the message to everyone in the military that there is a lack of faith in the officer corps,” Dempsey wrote on May 20. “Conveyance of a message that commanders cannot be trusted will only serve to undermine good order and discipline.”

The service chiefs all report to Defense Secretary Chuck Hagel, who has not taken a position on Gillibrand’s bill but has said he is open to discussing any legislative proposals to combat sexual assault.