Sen. Martha McSally, the first female fighter pilot to fly in combat, disclosed during an emotional Senate hearing on Wednesday she was "preyed upon and then raped" in the Air Force by a superior officer.

The Arizona Republican, who served 26 years in the Air Force, made the disclosure during a Senate hearing on sexual assault allegations in the military. McSally said she didn't report the assault because she didn't trust the system, and was ashamed and confused.

“My drive to fight against sexual assault in the ranks is not from the outside looking in," McSally began. "And it is deeply personal."

McSally said that during her military career, she was "greatly privileged to prepare and then lead my amazing Airmen in combat, which is the apex responsibility of any warrior leader."

But, McSally added that she had also "witnessed so many weaknesses in the processes involving sexual assault prevention, investigation, and adjudication," which motivated her "to make recommendations to Air Force leaders, shaped my approach as a commander, and informed my advocacy for change while I remained in the military and since I have been in Congress."

Then McSally revealed her own experience with abuse -- as she said she would use her "voice and unique experience to work on this mission to stop military sexual assault for good."

"I am so inspired by the many survivors who found the strength to share their stories, report their assaults, and demand accountability, justice, and change," McSally said. "It is because of you that a light has been shined on this silent epidemic and so many improvements have been made—including more than 100 legislative actions over the last decade—on all aspects of military sexual assault."

"So, like you, I also am a military sexual assault survivor, but unlike so many brave survivors, I didn’t report being sexually assaulted," she continued. "Like so many women and men, I didn’t trust the system at the time. I blamed myself. I was ashamed and confused. I thought I was strong but felt powerless. The perpetrators abused their position of power in profound ways. In one case I was preyed upon and raped by a superior officer."

McSally did not name the officer, but said she shares in the disgust of the failures of the military system and many commanders to address sexual violence. She said that's why the public must demand that higher-ranking officials be part of the solution.

"Like many victims, I felt like the system was raping me all over again." — Arizona GOP Sen. Martha McSally

"I stayed silent for many years, but later in my career, as the military grappled with the scandals, and their wholly inadequate responses, I felt the need to let some people know I too was a survivor," she said, choking up as she detailed what had happened to her. "I was horrified at how my attempt to share generally my experiences was handled. I almost separated from the Air Force at 18 years of service over my despair. Like many victims, I felt like the system was raping me all over again."

But, McSally said, "I didn’t quit. I decided to stay and continue to serve and fight and lead. To be a voice from within the ranks for women -- and then in the House and now the Senate."

An Air Force spokesperson apologized to McSally on Wednesday, calling the alleged rape "appalling."

“The criminal actions reported today by Senator McSally violate every part of what it means to be an Airman,"Air Force Capt. Carrie J. Volpe said in a statement. "We are appalled and deeply sorry for what Senator McSally experienced 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.”

CLICK TO GET THE FOX NEWS APP

The revelation came just weeks after Sen. Joni Ernst, R-Iowa, came forward in January with her story of being raped by a former boyfriend, saying she decided to do so after details of her divorce were made public.

McSally's disclosure also comes at a time of increased awareness over the problem of harassment and assault in the armed forces. 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.

McSally was defeated by Democrat Kyrsten Sinema in the 2018 Senate election by 2 percentage points. Interim Sen. Jon Kyl then announced he would resign as Arizona's other senator, and Republican Gov. Doug Ducey chose McSally to replace Kyl.

Fox News' Chad Pergram, Lucas Tomlinson, and The Associated Press contributed to this report.