Former Attorney General Bill Barr warned that China is the "biggest threat" facing the United States, warning that Beijing has a "highly aggressive plan" to take control of "key" technologies of the future.

During an interview with Fox News Digital about his new memoir, "One Damn Thing After Another," in which he details long-term national security challenges facing the U.S., Barr warned the Chinese will continue to be "a huge challenge" for the U.S.

RUSSIA-UKRAINE: FORMER AG BARR SAYS US 'CAN'T ALLOW THIS TO ESCALATE INTO A NUCLEAR WAR'

"China is the biggest threat that the country faces, not only militarily – because they are building a very capable military — but also technologically," Barr said, noting that the United States has been "the world’s technological leader and people are accustomed to that."

Barr told Fox News the Biden administration, in its efforts to combat the threat China poses, should "focus on the fact that it has been that leadership that makes us so prosperous and creates all the opportunity for future generations and provides for our security."

Attorney General William Barr

Attorney General William Barr during a news conference at the Department of Justice in Washington, Dec. 21, 2020.  (Michael Reynolds/Pool/AFP via Getty Images)

"The Chinese have a comprehensive, highly aggressive plan to take control of all of the key technologies of the future, such as 5G communications, robotics, artificial intelligence – all of the technologies that are going to be pivotal in the years to come," Barr said.

Barr said China is already "seizing on the high ground on a lot of that, through thefts of secrets."

"They are very industrious and enabled people," Barr said. "It is going to be a huge challenge for us going forward."

Barr, who served as attorney general under former presidents Trump and George H.W. Bush, began his career as an analyst in the Central Intelligence Agency and set a goal for himself to become an "expert on China" at a young age.

In his book, Barr wrote that he had "a clear sense of direction" in his life.

BARR SAYS BIDEN 'WEAKENED' US ECONOMY BY 'STOPPING' ENERGY PRODUCTION BEFORE RUSSIA'S WAR ON UKRAINE

Barr, as a high school student at Horace Mann in New York City, told a college guidance counselor his career goal was to become the director of the CIA.

In his memoir, Barr notes he wanted "a career in intelligence," and said his strategy was to make himself "an attractive candidate by becoming an expert on China."

Xi Jingping

Chinese President Xi Jinping and International Olympic Committee IOC President Thomas Bach attend the closing ceremony of the Beijing 2022 Olympic Winter Games at the National Stadium in Beijing, China, Feb. 20, 2022. (Li Xueren/Xinhua via Getty Images)

"My focus on China was, again, largely pragmatic," Barr wrote in his memoir. "I had no deep-seated attraction to China as an object of academic study."

Barr wrote that he reasoned that "because Russia had long been the United States’ main adversary, Russian experts were plentiful," and he described China "the threat of the future."

This week, the intelligence community released its annual threat assessment addressing global threats facing the United States for 2022, including Russia, China, North Korea, Iran and more.

As for China, the intelligence community said that the United States and its allies "will face an increasingly complex and interconnected global security environment marked by the growing specter of great power competition and conflict, while collective, transnational threats to all nations and actors compete for our attention and finite resources."

The assessment states that China is increasingly a "near-peer competitor, challenging the United States in multiple arenas — especially economically, militarily and technologically — and is pushing to change global norms and potentially threatening its neighbors."

Barr and Trump

Attorney General William Barr and President Trump in the Oval Office in 2019. (Drew Angerer/Getty Images)

And as many have said Putin’s invasion of Ukraine has emboldened China with regard to its ambition to take Taiwan, the intelligence community warned that Beijing is using a coordinated approach to compel neighbors to "acquiesce" to its preferences, "including its territorial and maritime claims and assertions of sovereignty over Taiwan."

"Beijing will press Taiwan to move toward unification and will react to what it views as increased U.S.-Taiwan engagement," the IC states. "We expect that friction will grow as China continues to increase military activity around the island, and Taiwan’s leaders resist Beijing’s pressure for progress toward unification."

The assessment added that China’s "control over Taiwan probably would disrupt global supply chains for semiconductor chips because Taiwan dominates production."

CLICK HERE TO GET THE FOX NEWS APP

"In the South China Sea, Beijing will continue to use growing numbers of air, naval and maritime law enforcement platforms to intimidate rival claimants and signal that China has effective control over contested areas," the assessment states. "China is similarly pressuring Japan over contested areas in the East China Sea."

The IC also assessed that China presents "the broadest, most active and persistent cyber espionage threat to U.S. Government and private sector networks."

"China’s cyber pursuits and export of related technologies increase the threats of attacks against the U.S. homeland, suppression of U.S. web content that Beijing views as threatening to its control and the expansion of technology-driven authoritarianism globally," the report states.