WASHINGTON, July 23 (Reuters) – The U.S. Senate on Thursday passed its version of the National Defense Authorization Act, a $740 billion bill setting policy for the Pentagon that President Donald Trump has threatened to veto over a provision removing Confederate names from military bases.

The vote was 86-14, one of the few times the Republican-led Senate has broken from the president, and could pave the way for a fight later this year with the White House.

The Democratic-led House of Representatives also passed its version of the NDAA earlier this week with far more than the two-thirds supermajority needed to override a veto.

Like the Senate NDAA, the House bill also included a provision to change the names of military facilities named after generals who fought on the pro-slavery side during the Civil War 155 years ago.

Tributes to the Confederacy, and slave owners – like base names and statues – have come under increasing scrutiny amid widespread protests over racial injustice sparked by police killings of Black Americans.

Now that the House and Senate have both passed versions of the bill, congressional negotiators will meet behind closed doors to negotiate a final, compromise NDAA, reconciling differences between the two. The process will likely take months.

That compromise must pass both chambers before it can be sent for Trump's signature or veto.

Related: Pentagon spokesman clashes with New York Times over editorial criticizing bases named after Confederates

The requirement to change the base names is likely to survive the process because it was passed by both chambers. Senate Republicans, who rarely break from Trump and have never overridden one of his vetoes, have urged the president to back off his veto threat.

Trump has called protesters “anarchists and agitators.”

One difference between the House and Senate bills is how they deal with Trump's plan to remove some U.S. troops from Germany. Senate leaders did not allow a vote on an amendment, offered by Republican Senator Mitt Romney, that would have restrained Trump's plan to move troops from Germany to other parts of Europe.

The House bill includes a provision that would bar a drawdown of U.S. forces in Germany or elsewhere in Europe unless the military leaders certify that the reduction would not affect the security of the United States and its allies.

The Senate bill also imposes new restrictions on the so-called 1033 program, in which the Department of Defense transfers military-grade equipment to local police forces, although it does not block them. That program has also been subject to scrutiny during demonstrations, as officers have used tear gas and driven armored vehicles while dealing with demonstrators.

The House bill does not include restrictions on the 1033 program.

Congress has passed the NDAA for 59 straight years. It is one of the few major pieces of legislation treated as “must-pass” because it governs everything from pay raises for the troops to how many aircraft should be purchased or how best to compete with rivals like Russia and China.

(Reporting by Patricia Zengerle in Washington Editing by Peter Cooney and Matthew Lewis)