China is the United States’ main national security challenge for the next 50 to 100 years, the Army general picked to become the top military officer in the United States said during a Senate hearing on Thursday.

“I think China is the main challenge to U.S. national security over the next 50 to 100 years,” said Army Chief of Staff Gen. Mark Milley, who has been nominated by President Donald Trump to become his top military adviser as the next chairman of the Joint Chiefs of Staff.

“I think some historian in 2119 is going to look back at this century and write a book, and the central theme of the story is going to be the relationship between the United States and China,” he added.

How the U.S. military handles a challenge from China’s growing military prowess was a dominant theme throughout the hearing, which was to vet Milley as a nominee.

There was bipartisan concern over China, and Milley assured them he was taking the challenge seriously and would stick to the National Defense Strategy written during the first year of Trump’s presidency that marked a focus away from counterterrorism and towards China.

“China and Russia have passed us in key areas, and are catching up in others,” Senate Armed Services Committee Chairman Jim Inhofe said in his opening remarks.

“We can no longer take America’s military superiority for granted. And years of budget cuts under the Obama administration left our military in a crisis that will take years to fix,” he said.

Two senators — Inhofe and Sen. Roger Wicker (R-MI) highlighted a recent Economist article that said China’s military spending rose by 83 percent in real terms between 2009 and 2018, and nearly at the same time, U.S. defense spending was cut just under 25 percent.

“You have said before [to] this committee … our military advantage has eroded. In some areas, China has passed us,” Inhofe said. “When you talk to the American people, there’s always this assumption that American has the best of everything … but it’s not true anymore.”

Inhofe said there is doubt over whether the U.S. has progressed as far as China on hypersonics, advanced cruise missiles, and artificial intelligence.

Wicker noted the article said China’s military splurge has enabled it to deploy precision missiles and anti-satellite weapons that challenge American supremacy in the Western Pacific. Asked if he agreed with that statement, Milley responded, “I do.”

“So it’s not an overstatement made by the press?” Wicker asked. “No, I don’t think so,” Milley said. “I think China has — for going on 30, 35 years now — have embarked upon what they refer to openly in the media and speeches as the ‘China Dream.'”

“And that is to be at least a peer competitor or world-class military with the United States’ military by the mid-2030s, and they want to have the capability to defeat us by mid-century, so they’re moving out on that in all the domains and all the different capabilities,” Milley added.

He said the top capabilities and emerging technologies the U.S. needs to spend vis-à-vis China and Russia are modernization and recapitalization of the nuclear triad, space, and artificial intelligence and hypersonics.

Milley pledged that if confirmed, he would look at the U.S. force posture in the Asia-Pacific region and the Arctic. He noted that the U.S. has an experimental Multi-Domain Task Force in the Asia-Pacific region, learning how to fight in all five domains — space, cyber, land, sea, and air — and were learning a number of lessons.

Milley said there is a “significant amount of U.S. military capability,” in the Indo-Pacific region. He said he wanted to do emergency deployment readiness exercises into the Asia-Pacific region and Europe to practice projecting power in an emergency.

He said he would take a “hard look” at whether the current U.S. Freedom of Navigation Operations in the South China Sea, aimed at keeping the strategic international waterway open for global commerce, were enough.

Milley said he would address China’s growing economic and military footprint all over the world by upholding the norms of the international order and stand up against China when those are violated.

“They’re using trade as leverage to achieve their national security interests, and the One Belt Road is a part of that, is part of a broader program,” he said.

Towards the end of the hearing, Milley emphasized that China was not an “enemy” but an “adversary” or “competitor.”

“We want peace, not war with China. But having said that, I think that the best way to do that is to make sure that we are prepared,” he said.

“China is improving their military very, very rapidly in space, air, cyber, maritime, land domains, etc. Their capabilities and doctrine and organization, and so on, their technological development, their procurement … so China is advancing very, very rapidly,” he said.

“We the United States need to make sure … that we do not lose our advantages that we have relative to other countries, specifically relative to China,” Milley said.

Follow Kristina Wong at @kristina_wong.