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 Milton LevinHow House Republicans scrambled the Russia probe Congress dangerously wields its oversight power in Russia probe The Hill's Morning Report — Sponsored by CVS Health — Trump’s love-hate relationship with the Senate MORE (D-Mich.), ranking member Sen. John McCainJohn Sidney McCainOvernight Defense: Pompeo lays out new Iran terms | Pentagon hints at more aggressive posture against Iran | House, Senate move on defense bill Senate GOP urges Trump administration to work closely with Congress on NAFTA Sarah Sanders: ‘Democrats are losing their war against women in the Trump administration’ MORE (R-Ariz.) and Sen. Lindsey GrahamLindsey Olin GrahamSenate GOP urges Trump administration to work closely with Congress on NAFTA Graham: Trump will 'end North Korea’s threat to the American homeland' in his first term Sunday shows preview: Lawmakers weigh in after Texas school shooting 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 DurbinRichard (Dick) Joseph DurbinThis week: House GOP regroups after farm bill failure Overnight Health Care — Sponsored by PCMA — Trump hits federally funded clinics with new abortion restrictions Dem lawmaker spars with own party over prison reform 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.