WASHINGTON (Reuters) - U.S. lawmakers announced an agreement on Monday on a $738-billion bill setting policy for the Department of Defense, including new measures for competing with Russia and China, family leave for federal workers and the creation of President Donald Trump’s long-desired Space Force.

It also calls for sanctions on Turkey over its purchase of a Russian missile defense system, and a tough response to North Korea’s efforts to develop nuclear weapons.

The U.S. House of Representatives and Senate Armed Services Committees agreed on a compromise version of the National Defense Authorization Act, or NDAA, after months of negotiations. It is expected to pass before Congress leaves Washington later this month for the year-end holiday break.

The legislation includes $658.4 billion for the Department of Defense and Department of Energy national security programs, $71.5 billion to pay for ongoing foreign wars, known as “Overseas Contingency Operations” funding, and $5.3 billion in emergency funding for repairs of damage from extreme weather and natural disasters.

There were concerns earlier this year that the NDAA might fail for the first time in 58 years over steep divides between the Democratic-controlled House of Representatives and Republican-controlled Senate over Trump’s policies.

Because it is one of the few pieces of major legislation Congress passes every year, the NDAA becomes a vehicle for a range of policy measures as well as setting everything from military pay levels to which ships or aircraft will be modernized, purchased or discontinued.

It includes a 3.1% pay hike for the troops, the largest in a decade and, for the first time, 12 weeks of paid parental leave for federal workers, something Democrats strongly sought.

Among other things, the proposed fiscal 2020 NDAA imposes sanctions related to Russia’s Nord Stream 2 and TurkStream pipelines and bars military-to-military cooperation with Russia.

Russia is building the pipelines to bolster supply to Europe while bypassing Ukraine, and members of Congress have been pushing the Trump administration to do more to stop the projects as they near completion.

PUNISHING TURKEY

The NDAA also prohibits the transfer of F-35 stealth fighter jets, which Lockheed Martin Corp LMT.N is developing, to Turkey. It expresses a Sense of Congress that Turkey's acquisition of Russia's S-400 missile defense system, which Washington says it not compatible with NATO defenses and threatens the F-35, constitutes a significant transaction under U.S. sanctions law.

The bill says Trump should implement sanctions on Turkey over the S-400 purchase, something lawmakers have been demanding.

The NDAA also reauthorizes $300 million of funding for the Ukraine Security Assistance Initiative, to include lethal defensive items as well as new authorities for coastal defense cruise missiles and anti-ship missiles.

Military aid to Ukraine has been at the center of the impeachment inquiry into Trump, after his administration held up security assistance for Kiev last summer even as the country dealt with challenges from Russia.

Fulfilling one of Trump’s most high-profile requests, the bill establishes the U.S. Space Force as the sixth Armed Service of the United States, under the Air Force.

The legislation also contains a series of provisions intended to address potential threats from China, including requiring reports on China’s overseas investments and its military relations with Russia.

It bars the use of federal funds to buy rail cars and buses from China, and it says Congress “unequivocally supports” residents of Hong Kong as they defend their rights and seek to preserve their autonomy with China. It also supports improving Taiwan’s defense capabilities.

The NDAA calls for a sweeping approach to North Korea’s nuclear weapons development, as well as the threat it poses to U.S. forces on the Korean peninsula and allies in the region.

It puts mandatory sanctions on North Korean imports and exports of coal and other minerals and textiles, as well as some petroleum products and crude oil, and it puts additional sanctions on banks that deal with North Korea.

The bill also bars the Pentagon from reducing the number of troops deployed to South Korea below 28,500 unless the Secretary of Defense certifies that it is in the U.S. national security interest to do so.