In January, Mattis described global warming as a “driver of instability” requiring a broader, “whole-of-government response.” Thomson Reuters President Trump has been highly dismissive of the long-term threat of climate change, to the point of recently pulling the U.S. out of the Paris international climate change accord. But not so Defense Secretary James “Mad Dog” Mattis and many other defense experts.

During his Senate confirmation hearing in January, Mattis described global warming as a “driver of instability” requiring a broader, “whole-of-government response.”

So it was significant that the House on Thursday defeated an amendment to national defense authorization legislation that would have blocked a detailed Department of Defense study into the 20-year impacts of climate change on national security and the military.

Like many other current and former military brass and defense experts, Mattis views the effects of climate change and rising sea levels as a grave threat to U.S. military operations and bases around the world. Mattis said in written testimony that it was essential that the military consider how changes like open-water routes in the thawing Arctic and drought in international trouble spots can present challenges for troops and defense planners, as ProPublica reported in March.

“Climate change is impacting stability in areas of the world where our troops are operating today,” Mattis said in a written response to a question posed by a Democratic member of the Senate Armed Services Committee. “It is appropriate for the Combatant Commands to incorporate drivers of instability that impact the security environment in their areas into their planning.”

Rep. Scott Perry (R-Pa.), who offered the amendment to the national defense authorization, said it wasn’t meant to challenge the existence of climate change, but rather to make the point that numerous other agencies are already studying climate change and that “this should not be the priority” of the military, according to The Hill.

But the House disagreed and rejected his amendment, 234 to 185, with 46 Republicans joining with 188 Democrats to preserve the study. Rep. Elise Stefanik (R-NY) argued that the effects of climate change “are drivers of geopolitical instability and degrade the security of the United States.”

“We would be remiss in our efforts to protect our national security to not fully account for the risk climate change poses to our bases, our readiness and to the fulfillment of our armed services mission,” she said.

Indeed, extreme weather patterns and rising sea levels already are posing problems or many military facilities. Military installations on waterfront properties are facing hundreds of floods a year, and in some cases could be mostly under water by 2100, according to a report by the Union of Concerned Scientists.

Thursday’s vote was hailed by environmentalists, who have had little to cheer about since Trump took office and Environmental Protection Agency Administrator Scott Pruitt has begun systematically dismantling many of the Obama administration’s climate change initiatives.

Ironically, the vote came one day after the announcement that an iceberg the size of Delaware had broken away from the Antarctic Peninsula this week, sparking renewed concerns about the potential adverse impact of climate change.

Elizabeth Thompson, president of the EDF Action, an environmental advocacy group, said the House vote “shows that common sense can prevail in Congress on the issue of climate change.”

“Congress, and all Americans should support our military being well-informed about the risks caused by climate change and prepared to effectively address any global instability it causes,” she said in a statement.