The United States must build up its military to prepare for the possibility of conflict with Russia and China, according to a new Pentagon strategy released Friday by Defense Secretary Jim Mattis as he took Congress to task on the eve of a potential government shutdown for years of failing to reach budget deals.

Mattis described the strategy as a “clear-eyed appraisal of our security environment with a keen eye of America’s place in the world,” and said it is based on a “fundamental precept” that “America can afford survival.”

The new strategy touches on a range of issues, including operations in Afghanistan and the need to counter “rogue nations” like North Korea, but places the heaviest emphasis on ensuring the United States stays ahead of other world powers. It marks a shift from the Obama administration’s approach, which put greater emphasis on terrorism.

“We will continue to prosecute the campaign against terrorists, but great-power competition — not terrorism — is now the primary focus of U.S. national security,” Mattis said in a speech at Johns Hopkins University’s Paul H. Nitze School of Advanced International Studies. “This strategy is fit for our time, providing the American people the military required to protect our way of life, stand with our allies and live up to our responsibility to pass intact to the next generation those freedoms we enjoy today.”

The new document does not mention climate change as a threat, as the Obama administration typically did. Deputy Defense Secretary Patrick Shanahan predicted that would be the case last month, saying the Pentagon focused on other priorities. Mattis has stated the department must prepare for climate change, while President Trump has repeatedly expressed skepticism that it exists.

The defense secretary saved some of his toughest words for lawmakers as the government approaches a shutdown at midnight, saying the military needs Congress “back in the driver’s seat” and making budget decisions.

“For too long we have asked our military to stoically carry a ‘success at any cost’ attitude, as they worked tirelessly to accomplish the mission with inadequate and misaligned resources simply because the Congress could not maintain regular order,” Mattis said. “Loyalty must be a two-way street. We expect the magnificent men and women of our military to be faithful in their service, even when going in harm’s way. We must remain faithful to those who voluntarily sign a blank check to the American people, payable with their life.”

Mattis cited a comment from House Speaker Paul D. Ryan (R.-Wis.) in underscoring his opinion: “Our men and women in uniform are not bargaining chips.” He also struck a bipartisan tone, citing comments from Sen. Jack Reed (D.-R.I.), who said in November the nation needs bipartisan investment in U.S. troops to keep the military prepared.

“I am optimistic that Congress will do the right thing and carry out their responsibility,” Mattis said, before drawing a laugh by adding: “I may be in the minority in this room, when I say that, but I’m an eternal optimist.”

Mattis, asked a question by a Johns Hopkins student about whether a shutdown would have serious ramifications on military operations, answered bluntly: “Yes.” Then he gave an example involving military reservists, saying some of them will be sent home instead of completing their monthly training.

“They’ll suck it up, and they’ll say, ‘okay,'” Mattis said. “If they’re Navy reservists, they’ll say, ‘Aye, aye, sir,’ cheerfully. And, when they get in their car they may not mutter something quite so positive.”

Mattis added maintenance activities will “probably pretty much shut down,” and about 50 percent of the Defense Department’s civilian workforce will be furloughed. Some intelligence operations abroad also will stop, he said, without elaborating.

A Defense Department memo distributed Friday said U.S. troops will not be paid during a shutdown but will work anyway even as some training is halted. Defense Department civilian workers supporting tasks that are considered essential will also work unpaid.

The new National Defense Strategy describes the United States as “emerging from a period of strategic atrophy,” and assesses the United States must make a sustained financial investment in the military to overcome it. The strategy was formed after years of frustration from senior military leaders that the Pentagon’s fleet of aircraft, vehicles and ships have been worn down in seemingly endless warfare.

The strategy document itself is classified, but an 11-page summary shows it calls for building a larger, more agile military, strengthening military alliances from the Middle East to Asia and reforming the Pentagon’s acquisition programs to field weapons equipment more quickly, with upgrades made as needed afterward. The strategy also advocates pursuing several options that have long been considered, including preparing U.S. forces to fight from smaller, dispersed bases, investing in robotic equipment that acts independently, and modernizing nuclear weapons and missile defense.

“To those who would threaten America’s experiment in democracy: If you challenge us, it will be your longest and worst day,” he said. “Work with our diplomats. You don’t want to fight the Department of Defense.”

The document is likely to be greeted warmly by those interested in spending more money on the military and skeptically by those who note the Pentagon often puts together new documents outlining strategy, only to disregard them later. Senior Pentagon officials cast it as a blueprint Mattis will use to press for change.

“I think there is much deeper and wider appreciation for the challenges to American military advantage than there have been in the past,” Elbridge Colby, the deputy assistant secretary of defense for strategy and force development, told reporters in advance of the document’s release. “I can certainly guarantee to you that this is associated with big implementation efforts that have already started to bear fruit, and it will continue to do so.”

Asked whether he could provide examples of efforts that already have shifted or changed, Colby said he did not think so.

The classified document was mandated by Congress in the 2017 National Defense Authorization Act, which called for the defense secretary to present a new national defense strategy in the year following a presidential election. It replaced other unclassified strategy documents, which critics said became increasingly broad and obsolete because they were unclassified.

The new defense strategy was written at the same time as the national security strategy Trump released in December, and it flows from the president’s vision of “peace through strength,” Colby said. Mattis had a hand in the formation of both.

Colby said despite the sharper emphasis on China and Russia, the United States will continue to look for areas to cooperate with them.

“This is not a confrontation,” Colby said. “It’s a strategy that recognizes the reality of competition and the importance of ‘good fences make good neighbors.’ ”

This story was originally published at 10 a.m. and updated with additional reporting.