WASHINGTON – Sen. Kirsten E. Gillibrand on Thursday vowed to keep fighting to put military prosecution of sexual assault in the hands of trained prosecutors despite a stinging defeat on the Senate floor that derailed her yearlong fight for legislation that would do just that.

“As painful as today’s vote is, our struggle on behalf of the brave men and women who serve in our military will go on,” the NewYork Democrat said after her bill to reform the system of military justice fell five votes short of the 60 needed to proceed. “We owe so much to those who bravely serve our country, and I will never quit on them.”

A majority of senators – 55 – supported Gillibrand’s measure, but it failed to move forward because 60 votes are needed to overcome a filibuster.

The vote followed a long effort by Gillibrand to build support for her measure across party lines and a brief but fierce floor debate that pitted her and her reform-minded allies against Senate traditionalists from both parties.

Gillibrand argued that the current system – in which victims have to report sexual assaults to their commanding officers, who then decide how to handle the complaint – is a failure. For proof, she cited Pentagon statistics that show just 2 in 10 such incidents being reported and only 1 in 100 ending in a conviction.

There’s a reason why most victims are not reporting those crimes, Gillibrand told her colleagues on the Senate floor.

“The people who don’t trust the chain of command are the victims,” she said.

But Senate veterans such as Sen. John McCain, R-Ariz., argued that her proposal would undermine the authority of the nation’s military commanders.

“When you take this responsibility from the commanding officer, you are eroding their ability to lead – and, I would argue – their ability to fight,” McCain said.

Gillibrand and her opponents have been making similar arguments for nearly a year at hearings and news conferences, and it all culminated in a tense roll call vote where the outcome was unknown until the 41st senator voted nay.

Fifty-five senators had signed onto Gillibrand’s legislation, and she had expressed confidence in recent weeks that she would be able to get to the required 60.

But 10 senators didn’t say how they would vote until Thursday.

And in the end, Gillibrand’s vote total remained at 55. Two senators who had not previously endorsed the measure – Senate Minority Leader Mitch McConnell, R-Ky., and Sen. Mike Enzi, R-Wyo. – voted for it, but Gillibrand also lost the support of Sens. Thomas R. Carper, D-Del., and Mark S. Kirk, R-Ill., who had previously supported the bill.

Still, Gillibrand was able to cobble together an unusual bipartisan coalition – including two tea party favorites, Sen. Rand Paul, R-Ky., and Sen. Ted Cruz, R-Texas – to favor the bill. In the end, 10 Republicans voted for Gillibrand’s measure, while 10 Democrats opposed it.

Iowa Sen. Charles E. Grassley, another Republican who backed the measure, noted that military leaders have been promising for years to get tough on sexual assaults within the ranks, to no apparent effect.

“Enough is enough,” Grassley said.

“Taking prosecutions out of the hands of commanders and giving them to professional prosecutors who are independent of the chain of command will help ensure impartial justice for the men and women of our armed forces.”

After the vote, Cruz lavished praise on Gillibrand, who on most issues is his ideological opposite.

Noting that a substantial bipartisan majority had favored her bill, Cruz said: “Those 55 senators should be commended, none more than Sen. Kirsten Gillibrand, who has led this fight with a passion and a tenacity. There’s not a member of this body that she has not pigeonholed and argued and pleaded and used every persuasive force possible to try to round up those votes.”

Nevertheless, Gillibrand ran into a brick wall of opposition from the Pentagon and its staunchest Senate supporters, including Senate Armed Services Committee Chairman Carl M. Levin, D-Mich.

“How can we best strengthen our protections against military sexual assault? We do so by empowering victims and by holding our commanders accountable,” Levin said.

“But we threaten to weaken those protections if we undermine the authority of the very commanders who must be at the heart of the solution.”

After failing to move Gillibrand’s measure forward, the Senate overwhelmingly adopted legislation authored by Sen. Claire C. McCaskill, D-Mo., that aims to make it easier for victims to report sexual assaults in the military but that still leaves the authority over prosecutions in the hands of commanders.

Although the two senators are rivals on the issue, Gillibrand supported McCaskill’s measure, which the Missouri senator said would make the military justice system more friendly to victims.

“This debate has been about one thing: getting the policy right to best protect and empower victims, and boost prosecutions of predators,” McCaskill said. “I believe we’re on the cusp of achieving that goal.”

But by no means were Thursday’s votes the Senate’s last word on the issue. Congress has to pass a defense authorization bill every year, and Gillibrand vowed to renew her fight for her proposal when the Senate considers that larger defense bill later this year.

“Many people said to me: ‘Kirsten, I’m going to watch this; if it doesn’t get better in the next six months, I’m with you next time,’ ” Gillibrand said. “They want to see what happens. I think there will be many more senators who will side with us.”

Gillibrand’s aides believe that additional damaging reports about sexual assault in the military would bolster her case going forward – and two such stories surfaced Thursday.

Army Brig. Gen. Jeffrey A. Sinclair – who was charged with sexual assault after allegedly forcing a female officer to perform oral sex and threatening to kill her family if she told anyone they were having an affair – pleaded guilty to three lesser charges.

And Stars and Stripes reported that Lt. Col. Joseph “Jay” Morse, the Army’s top prosecutor for sexual assault cases, has been suspended after a lawyer who worked for him complained that he groped her and tried to kiss her at a 2011 legal conference on sexual assault.