Countering China's rapidly expanding military and an increasingly aggressive Russia are now the U.S. military's top national security priorities, outpacing the threat of terrorism, Defense Secretary Jim Mattis said Friday. He said competition with those adversaries has threatened America's military advantage around the world.

Laying out a broad new strategy for the Defense Department, Mattis warned that all aspects of the military's competitive warfighting edge have eroded.

He said building a force that can deter war with established and emerging military powers in Moscow and Beijing, and U.S. enemies such as North Korea and Iran will require increased investment to make the military more lethal, agile and ready to fight.

"We will continue to prosecute the campaign against terrorists that we are engaged in today, but great power competition — not terrorism — is now the primary focus of U.S. national security," Defense Secretary Jim Mattis said in remarks at the Johns Hopkins School of Advanced International Studies.

He said the Islamic State group's "physical caliphate" in Iraq and Syria had been defeated, but that IS, al-Qaida and other extremists still pose threats across the globe.

Mattis repeated his call for America to work closely with allies and partners — an approach that aligns more closely with previous administrations than President Donald Trump's "America First" ideas. That mantra was repeated in a national security strategy that Trump's administration released in December.

The U.S. and its allies, Mattis said, are stronger together. He recalled going to his first NATO meeting last year, carrying Trump's demand for nations to increase their defense spending and thinking about how to fit Trump's message into the broader framework of working with partners.

When he got to Brussels, Mattis said he told the alliance: "Here's the bottom line: Please do not ask me to go back and tell Americans — the American parents — that they need to care more about the safety and security and the freedom of your children than you're willing to care for, than you're willing to sacrifice for. We're all going to have to put our shoulder to the wagon and move it up the hill."

Did the message resonate? "It's going better than expected," Mattis said Friday.

The most dominant theme in his strategy is for the U.S. to regain its competitive edge with China and Russia, according to an 11-page, unclassified version released by the Pentagon.

That shift reflects persistent U.S. worries about China's military buildup in the South China Sea, its moves to expand its political and economic influence, and what has been described as Beijing's systematic campaign of cyberattacks and data theft from government agencies and private U.S. corporations.

The shift also underscores broad American concerns about Russia, given Moscow's takeover of Ukrainian territory, involvement in Syria's war and alleged meddling in the 2016 U.S. presidential election.

"We've been doing a lot of things in the last 25 years, and we've been focused on really other problems and this strategy really represents a fundamental shift to say, look, we have to get back, in a sense, to basics of the potential for war," said Elbridge Colby, the deputy assistant defense secretary for strategy. "This strategy says the focus will be on prioritizing preparedness for war and particularly major power war."

Previous defense chiefs long warned about China, and the Obama administration put a greater focus on the Asia-Pacific region, including by adding ships and troops.

Derek Chollet, former senior Pentagon official in the Obama administration and now with the German Marshall Fund in Washington, said much of the strategy is "old wine in a new bottle, but in this context, that's a good thing." He said he was "struck by his emphasis on strong diplomacy, getting out from under budget chaos, and the importance of having a healthy democracy. That's all correct, just seemed to be at variance with what's happening elsewhere in the government, including the White House."

Russia's Foreign Minister Sergey Lavrov told reporters at U.N. headquarters in New York that militaries frequently want more resources, but "it is regrettable that instead of having normal dialogue, instead of using the basis of international law, the U.S. is trying to prove their leadership through such confrontational strategies and concepts."

He said Moscow is open to discuss military doctrines and the kind of military contacts that previously existed between the two countries."

Colby said the U.S. still seeks areas of cooperation with Russia and China, stressing "this is not a strategy of confrontation."

The U.S. has pushed China to increase pressure on North Korea to abandon its nuclear ambitions. Washington has maintained talks with Russia to ensure no conflicts or accidents in the sky over Syria, where both nations are bombing IS fighters.

The strategy, however, faces grim budget hurdles. And Mattis criticized Congress for budget caps that have done more to erode military readiness than any other enemy since 9/11.

"For too long we have asked our military to stoically carry a 'success at any cost' attitude, as they work tirelessly to accomplish the mission with now inadequate and misaligned resources, simply because the Congress could not maintain regular order," Mattis said.

Lawmakers have been deadlocked on a spending bill, bringing the federal government to the brink of a shutdown at midnight Friday. They're still constrained by the Budget Control Act of 2011, which put mandatory spending caps in place.

The Pentagon strategy acknowledges the budget limits, and seeks greater spending discipline and management, along with base closings to save money. Congress has repeatedly rejected additional base closings.

___

Associated Press writer Edith Lederer at the United Nations contributed to this report.