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 LevinCongress: The sleeping watchdog Congress must not give companies tax reasons to move jobs overseas A lesson on abuse of power by Obama and his Senate allies MORE (D-Mich.), ranking member Sen. John McCainJohn Sidney McCainGOP strategist donates to Alabama Democrat Meghan McCain knocks Bannon: 'Who the hell are you' to criticize Romney? Dems demand Tillerson end State hiring freeze, consult with Congress MORE (R-Ariz.) and Sen. Lindsey GrahamLindsey Olin GrahamGOP and Dems bitterly divided by immigration We are running out of time to protect Dreamers US trade deficit rises on record imports from China 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 DurbinDemocrats turn on Al Franken Minnesota's largest newspaper calls on Franken to resign Democratic senator predicts Franken will resign Thursday 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.