A thousand years ago, when money meant coins, China invented paper currency. Now the Chinese government is minting cash digitally, in a re-imagination of money that could shake a pillar of American power. It might seem money is already virtual, as credit cards and payment apps such as Apple Pay in the U.S. and WeChat in China eliminate the need for bills or coins. But those are just ways to move money electronically. China is turning legal tender itself into computer code.

Cryptocurrencies such as bitcoin have foreshadowed a potential digital future for money, though they exist outside the traditional global financial system and aren’t legal tender like cash issued by governments. China’s version of a digital currency is controlled by its central bank, which will issue the new electronic money. It is expected to give China’s government vast new tools to monitor both its economy and its people. By design, the digital yuan will negate one of bitcoin’s major draws: anonymity for the user.

Beijing is also positioning the digital yuan for international use and designing it to be untethered to the global financial system, where the U.S. dollar has been king since World War II. China is embracing digitization in many forms, including money, in a bid to gain more centralized control while getting a head start on technologies of the future that it regards as up for grabs.

“In order to protect our currency sovereignty and legal currency status, we have to plan ahead,” said Mu Changchun, who is shepherding the project at the People’s Bank of China. Digitized money could reorder the fundamentals of finance the way Amazon.com Inc. disrupted retailing and Uber Technologies Inc. rattled taxi systems.

That an authoritarian state and U.S. rival has taken the lead to introduce a national digital currency is propelling what was once a wonky topic for cryptocurrency theorists into a point of anxiety in Washington.

Asked in recent weeks how digitized national currencies such as China’s might affect the dollar, Treasury Secretary Janet Yellen and Federal Reserve Chairman Jerome Powell have said the issue is being studied in earnest, including whether a digital dollar makes sense someday.

The dollar has faced challengers before—the euro, to name one—only to grow more important when rivals’ shortcomings became apparent. The dollar far outstrips all other currencies for use in international foreign-exchange trades, at 88% in the latest rankings from the Bank for International Settlements. The yuan was used in just 4%.

Digitization wouldn’t by itself make the yuan a rival for the dollar in bank-to-bank wire transfers, analysts and economists say. But in its new incarnation, the yuan, also known as the renminbi, could gain traction on the margins of the international financial system.

It would provide options for people in poor countries to transfer money internationally. Even limited international usage could soften the bite of U.S. sanctions, which increasingly are used against Chinese companies or individuals.