The death threats began again shortly after Lieutenant Adam Cohen, a combat systems engineer in the US air force, returned from Afghanistan in October 2011. The messages, littered with obscenities and urging him to take his own life, were linked, he believes, to an alleged rape he had not reported from years earlier.

But when Cohen, 29, reported the threats and the alleged sexual assault to his chain of command, he found himself under investigation.

On Monday, in a turn of events that has been called into question by two senators, advocates groups and the special victims counsel the air force employed to help him, Cohen faces a court martial, accused of multiple charges.

Cohen was due to plead guilty to the charges against him on Monday. He told the Guardian that he took the decision in order to stop his alleged rapist, who is now a US army major, from testifying in court against him.

The major remains the focus of a military investigation into the alleged rape, according to Cohen’s SVC, but is now immune from prosecution because of the statute of limitations.

Cohen, who is gay, could now face a lengthy prison sentence. The charges against him range from making false statements to investigators and criminal offences akin to wiretapping, to “conduct unbecoming an officer”, including sexual misconduct that occurred before the 2011 repeal of ‘don’t ask, don’t tell’, the military law that forced gay and lesbian military members to keep their sexuality secret.

Each charge carries a maximum sentence of between two and 35 years, according to the air force.

Days before his military trial, due to begin Monday at McConnell air force base, in Wichita, Kansas, Cohen spoke to the Guardian about his ordeal.

Sitting in a small room next to the base chapel which has become a haven for him in recent months, Cohen said: “I don’t want to be in the court room with my rapist testifying against me because it would feel like being raped all over again.

“Not only did I not get justice for him attacking me but he would be able to grin and point in my face and say I did something wrong when I didn’t.”

His decision at the weekend to plead guilty is expected to reduce the severity of the sentence he faces if found guilty, he said.

He accused the air force of an “arbitrary and capricious” prosecution against him, in retaliation for reporting a sexual assault. Cohen has flown in over 40 combat missions overseas, and has medals for combat flights in Afghanistan, where he served three tours. Joining the air force was something he has wanted to do ever since he watched the second hijacked plane fly into the World Trade Center in his home in California on 9/11.

But he no longer has any faith in a military system which, he said, has failed to protect him from harassment and has punished him for reporting a sexual assault claim.

“This is the air force and the country that I love. But I’ve seen people admitting harassment and no action was taken. I’ve seen an open sexual assault investigation, where the air force is colluding with the assailant to testify against the victim. Throughout the entire time they were supposed to inform me of my rights and they didn’t. What message does it send?”

Sexual assault in the US military is at record levels. The Pentagon estimates that the majority of the 26,000 service members reporting “unwanted sexual contact” in 2012, up from 19,000 in 2010, are attacks on men, by men.

Major John Bellflower, a special victims counsellor assigned to Cohen in January 2013 as part of an air force pilot programme to tackle sexual assault, said the prosecution would have a “chilling effect” on future victims.

“I can’t say what the intent is because I can’t see into their minds,” Bellflower told the Guardian. “I can say what the effect is and that is they have punished him for coming forward with a claim of sexual assault. None of this would have come about if he had not. They started digging into his past, using his words against him.

“Future victims are going to look at this and think twice about reporting a claim in case the investigation can turn on them.”

Cohen’s case offers an extreme example, Bellflower said, of a big problem in the US military: why many victims do not report crimes of sexual assault. A Pentagon report, released earlier this month found 62% of victims who report their attacks said they faced retaliation afterwards.

“To this day, I regret doing it,” Cohen said. “Had I not filed an allegation, none of this would have occurred.”

Cohen has offered his resignation, but it was not accepted. He has served in the air force for four years and his contract runs for six.

Last month, Senator Kirsten Gillibrand, the chair of the Senate armed services committee on personnel, wrote a letter to air force command at the Pentagon, saying she was “deeply concerned” by the military justice procedures that led from Cohen “being a victim of a sexual assault to his current prosecution by court martial”. She has also written to the Department of Defense calling for an independent investigation into Cohen’s case.

Senator Jeanne Shaheen, of New Hampshire, has also contacted the air force, asking it to review its decision to prosecute and to report its findings.

In a letter, dated 26 June, a draft of which has been seen by the Guardian, Gillibrand, a Democratic senator from New York, wrote she was “especially concerned” that investigators did not tell Cohen he had gone from being the victim to a suspect, that he was not informed of his rights in a timely manner, that investigators did not follow rules for interviewing witnesses, and that the “original assailant was granted immunity from prosecution while the investigators let the statute of limitations expire”.

Gillibrand said that Cohen’s “ability to serve effectively had been irreparably compromised” and asked the US air force to accept his resignation or administrative separation with honourable discharge instead of the trial. Failing that, she asked the air force to drop or reduce the charges to non-judicial punishment or to halt the trial until an independent inspector general investigation had been carried out.

Cohen said he kept silent for four years about the alleged sexual assault, because he feared retaliation. His attacker, he said, had taken explicit pictures that identified Cohen, and had threatened to claim the attack was consensual. Under DADT, any evidence of Cohen’s being gay could have led to his discharge.

He reported the allegations of harassment and the rape he says that prompted it in October 2011, because “I just really wanted the harassment to stop. You never really put it [the rape] behind you but I had bottled it up and compartmentalised it and I just wanted to be left alone.”

The air force said it had referred the investigation into the sexual assault claims to the army’s criminal investigative division as it had jurisdiction over the alleged perpetrator.

Bellflower said that the prosecution of Cohen followed a flawed investigation into his client’s allegations of harassment and the sexual assault he said prompted it. “I have never seen such a problematic investigation in my entire career,” he said.

In a report quoted in emails seen by the Guardian, the air force’s investigating officer, Lieutenant Colonel Shelley Schools, acknowledged “several major missteps” during the investigation, including Cohen not being read his rights and a group interview of three suspects accused of harassing Cohen. The officer also noted that three other investigators found the information flowing into the inquiry to be “confusing, inconsistent and overwhelming”. The officer said that the intermingling of Cohen’s status as a victim and suspect posed legal problems.

Describing the air force investigation, Bellflower said: “It was one faulty thing after another. First you have a sexual assault that is ignored. Then the evidence is collected from someone you think is a suspect. Then you start digging into his past under don’t ask, don’t tell.”

The US air force has denied Cohen’s claim that the prosecution is a punishment for bringing a sexual assault claim or that the initial investigation was inadequate.

In an email, Major Michael Meridith, director of public affairs at the 18th air force, said: “The air force takes all allegations of offenses against its members very seriously and we investigate each one, particularly issues such as sexual assault, harassment, and stalking.”

He said the air force began an investigation into Cohen’s allegations of sexual harassment and inappropriate emails in November 2011. “During this investigation, the air force came across evidence that led them to suspect Lieutenant Cohen of the crimes for which he is now charged.”

The charges against Cohen included “multiple violations of the Uniform Code of Military Justice, including military offenses akin to federal wiretapping crimes, criminal sexual harassment, misleading investigators, willfully disobeying a lawful order and fraternization.”