Senate Armed Services Committee member Sen. Claire McCaskill (D-Mo.) left, and Sen. Kelly Ayotte (R-N.H.) meet with reporters on Capitol Hill. (Pablo Martinez Monsivais/AP)

Sen. Claire McCaskill’s bill to overhaul — yes, overhaul — the way sexual-assault cases are handled in the military has routinely been described as more modest, conservative, watered-down and incremental than her Senate colleague Kirsten Gillibrand’s measure.

The legislation pushed by Gillibrand (D-N.Y.), which would have taken the prosecution of sex crimes in the military out of the chain of command and put it in the hands of military prosecutors, was narrowly defeated Friday.

McCaskill’s bill is expected to pass Monday, a result widely seen as an affront to victims by a Congress that is still too male and overawed by military commanders to meaningfully challenge them.

But occasionally the first draft of history is written by the losers, and that’s certainly the case for Gillibrand, whose defeat was headlined in The Washington Post as “How Kirsten Gillibrand won by losing.

McCaskill, meanwhile, has just as clearly lost by winning, with far less attention paid to either her bill or her view.

The supposed nothing-burger of the bill put forth by McCaskill (D-Mo.) would get rid of the “good soldier” defense that takes irrelevant factors such as the service record of the accused into account. In cases where there is a dual jurisdiction because the crime occurred off of a military base, the victim would get a say in whether the case would be handled in a civilian or military court. It would extend protections to students in service academies. And it would require that in every decision on every promotion in the military, that commander’s record on the handling of sexual-assault cases would have to be taken into account.

“The most frustrating thing about this,’’ McCaskill said in a phone interview Friday, “is the narrative that, ‘Whose side are you on, the victim’s or the commander’s?’ That’s offensive. If I didn’t care so much about this,’’ she said, she would have let Gillibrand’s bill go to a vote, although convinced that she would be harming the victims.

A former prosecutor, McCaskill said she spent her legal career supporting sex-crime victims at a time few others would. “The guys in my office used to laugh at the cases I’d take to court,’’ she said. “I took three guys who took a stripper home to court, and got them all three convicted.’’

McCaskill says that taking the prosecution of sex crimes in the military out of the chain of command would have resulted in fewer prosecutions, not more, because prosecutors, she said, “get seduced by a win-loss record, and don’t want to take a loser to court.”

Under Gillibrand’s bill, if a prosecutor doesn’t want to take the case to trial, that’s the end of it, whereas under McCaskill’s, if the prosecutor wants to take the case and the commander does not, it’s automatically referred to the civilian secretary of that branch of the service for review. In cases where neither the prosecutor nor the commander wants to bring the case, it’s also referred to the secretary.

McCaskill points out that the military sexual-assault cases in the news would not have been brought if Gillibrand’s bill were law. After an Army captain accused Brig. Gen. Jeffrey A. Sinclair, it was the commander, rather than prosecutors, who insisted that the case go to court.

Similarly, in the case involving the Naval Academy midshipman who three former football players were accused of assaulting, prosecutors initially chose not to take the case — a decision overturned by the commander, instead of the other way around.

The commander decided that the case against two of the players should go forward, but prosecutors later dropped the case against a second player. The case against the one player who will go on trial next week would not have gone forward under Gillibrand’s bill, McCaskill said.

And the kind of brutal public questioning that the woman at the center of that case endured at a preliminary military hearing known as an Article 32 hearing can no longer occur because of changes that Gillibrand and McCaskill pushed for as part of the defense reauthorization agreement at the end of 2013. Now, the victim does not have to appear publicly. The accused, McCaskill said, “still has the right to discovery but through affidavits with their own lawyers.”

McCaskill said she’s been bruised by the pronouncements of other Democratic women in the Senate, especially Gillibrand and Barbara Boxer (D-Calif.). During Friday’s debate, McCaskill repeatedly said it was important to focus on their many areas of agreement, but Gillibrand wasn’t having it. “This is not an opportunity to congratulate ourselves on the great reforms we’ve done,’’ she answered pointedly.

But as much as that hurt McCaskill — “I’m a tough cookie, but both Boxer and Gillibrand’s arguments stung’’ — it was her ally on the bill, Sen. Lindsey O. Graham (R-S.C.), who she seems to have wanted to throttle as he argued with great emotion that taking sex crimes out of the chain of command would be a slap in the face to commanders.

“I tried to walk Lindsey back; I frankly could give a s--- if I hurt the commanders’ feelings, when my focus is on the victims I care about as much as she does,’’ McCaskill said of Gillibrand, “even if that acknowledgment is not always reciprocated.”