Sen. Kirsten Gillibrand's bill that would remove military commanders from the decision to prosecute a sexual assault has failed in the Senate.

The bill, which would reform the military’s legal system by allowing military lawyers to decide whether to prosecute assault claims, needed 60 votes to pass, but was defeated 55-45.

“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 New York Democrat said after the vote. “We owe so much to those who bravely serve our country, and I will never quit on them.”

Gillibrand was optimistic leading up to the vote, despite only having 55 senators publicly backing the bill.

“I think we're going to pass this bill,” Gillibrand told CBS News host Bob Schieffer on Sunday. “I think we have the votes we need. We already have a majority of the Senate behind it.”

Opponents of the bill, including top Pentagon officials, said the bill would remove accountability from military commanders.

“Commanders are accountable. They're accountable to their people, to their systems. That's the way the military has to work,” Defense Secretary Chuck Hagel said. “But if you disconnect the commanders ... then you were taking away a certain responsibility of that commander on not only knowing what's going on in his or her command, but actually having some responsibility. I don't want to do that. I want more responsibility put on our commanders, not less.”

Congress had already voted on several reforms for military sexual assault cases, including making retaliation against victims who report a crime, ending the statute of limitations on such cases and dishonorably discharging or dismissing anyone convicted of sexual assault. These, along with removing the ability of military commanders to overturn a conviction, were passed in the 2014 defense authorization bill.

Bill authored by Sen. Claire McCaskill, D-Mo., will receive a vote later today to end the “good soldier” defense from assault and rape cases. That bill is expected to easily pass.