WASHINGTON — Sen. Martha McSally, the first female Air Force fighter pilot to fly in combat, said Wednesday that she was sexually assaulted by a superior officer, and later, when she tried to talk about it to military officials, she "felt like the system was raping me all over again."

The Arizona Republican, a 26-year military veteran, made the disclosure at a Senate hearing on the military's efforts to prevent sexual assaults and improve the response when they occur. Lawmakers also heard from other service members who spoke of being sexually assaulted and humiliated while serving their country.

McSally said she did not report being raped because she did not trust the system, and she said she was ashamed and confused. She said she was impressed and grateful to the survivors who came forward to help change the system. She was in the ninth class at the Air Force Academy to allow women, and said sexual harassment and assault were prevalent. Victims mostly suffered in silence, she said.

Click here to listen to McSally's testimony, which begins at the 7:21 mark.

Reading from a prepared statement, she spoke of her pride in the military and her service to the country and her deep conflict over suffering abuse while doing it. She referred to "perpetrators" who had sexually assaulted her, an indication that she had been attacked more than once. The Senate Armed Services Committee room was silent as she went on. Fellow senators, surprised by her statement, lauded her for coming forward.

Here are the full remarks from @SenMcSallyAZ, as prepared for the Senate hearing: pic.twitter.com/78khZd1Cj0 — ABC15 Arizona (@abc15) March 6, 2019

I'm deeply affected by that testimony," said Sen. Kirsten Gillibrand, D-N.Y., who has pushed strongly for changes. At a break, McSally hugged others who were appearing before the committee, including a West Point graduate who detailed being raped by her commander.

Capt. Carrie Volpe, an Air Force spokeswoman, said the branch was appalled at and "deeply sorry" about what McSally had experienced.

The criminal actions reported today by Senator McSally violate every part of what it means to be an Airman," she said in a statement. "And we stand behind her and all victims of sexual assault. We are steadfast in our commitment to eliminate this reprehensible behavior and breach of trust in our ranks."

In her remarks, McSally did not go into much detail. She did not say whether her assaults happened at the academy or during active duty. She didn't name any names. She focused on the need for accountability at the commander level and down, and the improvements she's already seen in the system.

McSally stayed silent for years. But later, as she watched the military grapple with how to handle sexual assaults, she felt like she should speak out.

"I was horrified at how my attempt to share generally my experiences was handled," she said. She almost left the Air Force after 18 years. "Like many victims, I felt like the system was raping me all over again."

McSally's revelation comes not long after Sen. Joni Ernst , R-Iowa, detailed her own abuse and assault, and at a time of increased awareness over the problem of harassment and assault in the armed forces and the larger #MeToo movement that roiled Hollywood and major corporations.

Reports of sexual assaults across the military jumped nearly 10 percent in 2017 -- a year that also saw an online nude-photo sharing scandal rock the Defense Department. Reporting for 2018 is not yet available. Reports of sexual assaults were also up at the military academies, most at West Point.

McSally said she shares in the disgust of the failures of the military system and many commanders who haven't addressed the problems of sexual misconduct. She said the public must demand that higher-ranking officials be part of the solution, setting the tone for their officers.

"We have come a long way to stop military sexual assault, but we still have a long way to go," the senator said. "It took many years and too many lives ruined."

The senator told The Wall Street Journal last year that she had been sexually abused as a teenager by her high school track coach. She said the coach took advantage of her through "emotional manipulation" because her father had died. He denied the allegations.

Defense officials have argued that an increase in reported assaults reflects a greater willingness to report attacks, rather than indicating assaults are rising. Sexual assaults are a highly underreported crime, both in the military and across society. Greater reporting, they argue, shows there is more confidence in the reporting system and greater comfort with the support for victims.

"There is good reason for distrust of authority, civilian or military," said Conrad Brown a trauma counselor with La Frontera's EMPACT and a Vietnam veteran himself.

Brown said many survivors fear being re-victimized at work or in court. "There really can be personal, social, and even career implications for coming out with something of the sort. Power is power and there is always a temptation to abuse it," he said.

The culture of the military can also make it intimidating for victims to speak out about a sexual assault. "Learning to be strong, to survive on the battlefield is part of the military culture," said Brown. "There’s a very, very strong, frankly, masculine subculture in the military."

Brown thinks the culture is shifting. After McSally's announcement, the number of reported military sexual assaults may rise, but he believes it will mean survivors are sharing their stories and holding the ones responsible accountable.

"There is kind of a really beneficial copycat effect of people seeing the senator's disclosure as a positive example," said Brown. "Finding your voice and being relieved of a toxic secret is inherently healing, that’s a first step."

RELATED: Pentagon finds unwanted sexual contact up 50 percent at service academies

McSally served in the Air Force from 1988 until 2010 and rose to the rank of colonel before entering politics. She deployed six times to the Middle East and Afghanistan, flying 325 combat hours and earning a Bronze Star and six air medals. She was also the first woman to command a fighter squadron.

McSally, who had worked as a national security aide for Sen. Jon Kyl, R-Ariz., was elected to the House in 2014 and served two terms.

She was appointed by Gov. Doug Ducey, R-Ariz., in December to replace the late GOP Sen. John McCain after she narrowly lost last year's race for Arizona's other Senate seat to Democrat Kyrsten Sinema.

McSally had been critical of Donald Trump in 2016 but embraced a tough stance on immigration and praised the president during last year's midterm election. She will serve until 2020, when voters will elect someone to finish the final two years of McCain's term.