WASHINGTON — The Republican-led House decisively approved a defense policy bill on Friday that declares climate change a national security threat, demands rigorous oversight of the Pentagon’s cyber operations and rejects the Trump administration’s bid to close military bases.

Lawmakers voted 344-81 on Friday to pass the sweeping legislation. The bill authorizes $696 billion in defense spending for the 2018 fiscal year, including nearly $30 billion more for core Pentagon operations than President Donald Trump requested.

Yet defense hawks pushing the hardest for the big boost in spending still face an uphill battle. For the spending increases to materialize, Congress first will have to agree to roll back a 2011 law that set strict limits on military spending. But that won’t be easy. Lifting the so-called budget caps will face resistance from Democrats who are seeking to increase the budgets for other government agencies.

If a budget deal can’t be reached, Congress may be forced to fund the military through the use of stopgap spending bills. Under these short-term agreements, the Pentagon’s budget is set at current levels and the military services are barred from starting new programs.

“If you don’t raise the budget caps, this leaves us once again in the land of absurdity,” said Rep. Adam Smith, D-Wash. Smith is the top ranking Democrat on the House Armed Services Committee.

The bill includes a section that says global warming is “a direct threat to the national security.” It’s a potentially surprising addition given Trump’s publicly stated doubts about climate change and his recent decision to pull the U.S. out of the landmark accord aimed at combatting global warming.

The section requires the Pentagon to deliver a report to Congress detailing the impact of climate change on the armed forces. The climate change report also is to list the 10 military bases most vulnerable to rising oceans, increased flooding, wildfires and other effects of climate change.

Over White House objections, the bill added a bipartisan measure crafted by Smith and Rep. Mac Thornberry, the chairman of the Armed Services Committee, requiring the Defense Department to inform Congress within 48 hours of “any sensitive military cyber operation.” Offensive and defensive cyber operations are covered by the notification requirement, although covert actions are exempt.

The bill also mandates that the department tell Congress, also within two days, about the results of any legal review by one of the military services of a cyber capability that is intended to be used as a weapon. Thornberry, a Texas Republican, has described the measure as a way to promote greater transparency and accountability for one of the most classified elements of the American arsenal.

But the Trump White House insists that Congress already is kept well-informed of major cyber operations.

“This provision would risk exposure, and potentially restrict use, of cyber capabilities; jeopardize foreign partnership cooperation; and impose additional, unwarranted administrative requirements on DOD,” the White House said in a statement earlier this week.

The bill rejected the Trump administration’s request that the Pentagon be given the authority to start a new round of military base closings in 2021. Defense Secretary Jim Mattis told the Armed Services Committee last month that closing excess installations would save $10 billion over a five-year period. He said the savings which could be used to acquire four nuclear submarines or dozens of jet fighters.

But military installations are prized possessions in congressional districts and lawmakers refused to go along with Trump just as they denied former President Barack Obama’s bid to shutter facilities.

Before voting on final passage, 27 Republicans joined Democrats to turn aside a contentious amendment crafted by Rep. Trent Franks, R-Ariz., that would have required the Pentagon to identify “Islamic religious doctrines, concepts, or schools of thought” used by the Islamic State and other terrorist groups for recruitment, financing or propaganda purposes.

The assessments, according to Franks’ amendment, also would pinpoint “key thought leaders” who hold extremist views and those that don’t. But Rep. Keith Ellison, D-Minn., and other opponents of the amendment charged the measure would allow the U.S. government to target people, Muslims in particular, because of their religion. Ellison is the first Muslim elected to Congress.