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 LevinSen. Gillibrand, eyeing 2020 bid, rankles some Democrats The Hill's 12:30 Report Congress needs bipartisanship to fully investigate Russian influence MORE (D-Mich.), ranking member Sen. John McCainJohn Sidney McCainLawmakers worry about rise of fake video technology Democrats put Dreamers and their party in danger by playing hardball Trump set a good defense budget, but here is how to make it better MORE (R-Ariz.) and Sen. Lindsey GrahamLindsey Olin GrahamCongress punts fight over Dreamers to March Pence tours Rio Grande between US and Mexico GOP looks for Plan B after failure of immigration measures 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 DurbinAmerica’s waning commitment to the promise of the First Amendment Senate rejects Trump immigration plan What to watch for in the Senate immigration votes 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.