It is still unclear clear whether the change will satisfy the White House, which has threatened to veto the Defense bill over the detainee provisions early last month.

The Obama administration expressed its opposition to the use of military detention within the United States, but also had concerns over tying the hands of law enforcement officials by mandating military custody and prosecution of al Qaeda members. The administration also opposes restrictions on transferring Guantanamo detainees.

A half-dozen senators huddled on the Senate floor late Thursday afternoon to reach the deal as time wound down on debate. The new Feinstein amendment would get a vote as well as her original amendment, which was opposed by Armed Services Chairman Carl LevinCarl LevinFor the sake of American taxpayers, companies must pay their fair share What the Iran-Contra investigation can teach us about Russia probe Senate about to enter 'nuclear option' death spiral MORE (D-Mich.), ranking member Sen. John McCainJohn McCainGraham: There are 'no good choices left' with North Korea Graham: North Korea shouldn't underestimate Trump Give Trump the silent treatment MORE (R-Ariz.) and Sen. Lindsey GrahamLindsey GrahamOvernight Defense: US moving missile defense system to South Korea | Dems want justification for Syria strike | Army pick pushes back against critics of LGBT record Graham: There are 'no good choices left' with North Korea Graham: North Korea shouldn't underestimate Trump MORE (R-S.C.).

Those senators all said they supported the second Feinstein amendment because it does not change existing law, unlike the original amendment.

Levin and the Armed Services Republicans believe that the U.S. can already hold citizens indefinitely by the military, which Feinstein and others disagree with.

“I think a lot has been gained, a clear understanding has been gained of the problems inherent in the original bill,” Feinstein said on the floor. “I think members came to the conclusion they did not want to change present law.”

Senate Majority Whip Dick DurbinDick DurbinOvernight Energy: Lawmakers work toward deal on miners’ benefits Senate votes to confirm Rosenstein as deputy attorney general Overnight Finance: Dems want ObamaCare subsidies for extra military spending | Trade battle: Woe, Canada? | Congress nears deal to help miners | WH preps to release tax plan MORE (D-Ill.), an opponent of the detainee rules in the current bill, said he agreed with the compromise.

“The Supreme Court will decide who can be detained. The Senate will not,” Durbin said.

The full Senate bill is expected to pass later on Thursday evening after amendments are considered. If the bill passes, it would go to conference to reconcile with the House bill. Graham said he’s committed to keeping the amendment in the conference report.

Sen. Jon Kyl (R-Ariz.) was the one dissenting vote.