US Defence Secretary James Mattis says competition between great powers, not terrorism, is now the main focus of America's national security.
The US faced "growing threats from revisionist powers as different as China and Russia", he said, unveiling the national defence strategy.
In an apparent reference to Russia, he warned against "threaten[ing] America's experiment in democracy".
"If you challenge us, it will be your longest and worst day," he said.
America has been gripped by ongoing investigations into alleged collusion between the Trump 2016 election campaign and Russia.
Speaking at Johns Hopkins University in Baltimore, Mr Mattis also appealed to Congress to fund the military adequately and refrain from "indiscriminate and automatic cuts" to the US federal budget.
How much have America's defence priorities changed?
This is the first time the defence policies of the Trump administration have been spelled out in one place.
The threats listed are the same as under the Obama administration but the order of priority is different.
Formerly, jihadist militant groups like Islamic State or al-Qaeda were the focus but recently America's former Cold War opponents, Russia and China, have reasserted themselves strategically.
"We face growing threats from revisionist powers as different as China and Russia, nations that seek to create a world consistent with their authoritarian models," Mr Mattis said.
How big a threat to America are Russia and China?
The three great nuclear powers have posed a permanent existential threat to each other since Cold War days.
In recent years, however, fears have risen of the once-unthinkable: a direct conventional clash, particularly between Russia and the US in Syria or Ukraine.
The new strategy recognises that "China and Russia in particular have been assiduously working over a number of years to develop their military capabilities to challenge our military advantages", said Elbridge Colby, US deputy assistant secretary of defence for strategy and force development.
"This strategy really represents a fundamental shift to say, look, we have to get back, in a sense, to the basics of the potential for war and this strategy says the focus will be on prioritising preparedness for war, in particular major power war," he said.
What pitch for funding did Mr Mattis make?
The national defence strategy provides guidance for the 2019 defence budget.
The defence secretary said while the US was "still strong", its competitive edge had "eroded in every domain of warfare - air, land, sea, space and cyberspace - and is continually eroding".
"No strategy can survive without predictable funding. As hard as the last 16 years [since the 9/11 attacks] have been, no enemy has harmed the US military more than defence spending caps and sequestration."
Referring to the current wrangle in the Senate over a bill to fund federal agencies temporarily, he said a shutdown would have an impact on military operations.
"Our maintenance activities will probably pretty much shut down ... over 50 percent, altogether of my civilian workforce will be furloughed," he said.
"We do a lot of intelligence operations around the world and they cost money, those obviously would stop."