Republican Sen. John McCain says he is so disgusted by the rise of sexual assaults in the U.S. armed forces that he was recently unable to sign off on recommending military service to a young recruit and her family looking for advice.

McCain said Tuesday in a Senate hearing that he could not overstate his “disgust and disappointment” with the widespread number of sexual assaults and was forced to withhold his complete support for enlisting in the military due to the severity of the problem.

McCain, a veteran and former prisoner of war, was among the lawmakers who hammered America’s top military leaders during several hours of testimony on Capitol Hill.

In a rare appearance, the service chiefs of the Army, Navy, Marines, Air Force and Coast Guard sat side-by-side and testified at the packed Senate hearing. They were there to fight to keep their authority over military sexual assault and harassment cases even as one of their own, Army Gen. Ray Odierno, referred to the rapid rise in sexual assault cases as a “cancer within the force.”

"It's imperative that we take a comprehensive approach to prevent attacks, to protect our people, and where appropriate, to prosecute wrongdoing and hold people accountable,” Odierno said.

Army Gen. Martin Dempsey, the chairman of the Joint Chiefs of Staff, argued that commanders are critical to the legal system and said stripping them of their authority could adversely affect the mission.

“The role of the commander is essential,” Dempsey said during questioning by Sen. Carl Levin, D-Mich., chairman of the Armed Services Committee.

The military men took their verbal jabs from lawmakers on both sides of the aisle who repeatedly scolded them for the “dangerous climate” that had been developed in the military.

Anu Bhagwati, executive director of Service Women’s Action Network, or SWAN, told lawmakers there needs to be “wholesale changes made to the military culture” and argued that many service members don’t report abuse out of a fear of retaliation and “knowledge that nothing will happen to their perpetrator.”

Bhagwati, a former Marine captain and company commander, says the military “condones sexual violence and mistreatment of women,” adding “sexual predators thrive in the military.”

Bhagwati testified in March at the first Senate hearing on military sexual violence in nearly a decade.

In recent weeks, lawmakers led by Sen. Kristen Gillibrand, D-N.Y., and Sen. Claire McCaskill, D-Mo., have backed legislation that would remove commanders from the process of deciding whether serious crimes, including sexual misconduct cases, go to trial. That judgment would rest with experienced trial counsels who have prosecutorial experience and hold the rank of colonel or above.

Gillibrand’s legislation has 18 co-sponsors, including four Republicans.

In a recent report, the Pentagon estimated as many as 26,000 military members may have been sexually assaulted last year, up from an estimated 19,000 assaults in 2012, based on an anonymous survey of military personnel. While the number of sexual assaults that members of the military actually reported rose 6 percent to 3,374 in 2012, thousands of victims were still unwilling to come forward despite new oversight and assistance programs aimed at curbing the crimes, the report said.

The Associated Press contributed to this report.