The last emperor of China, Pu Yi, abdicated in 1912. He was the 12th emperor of the historically important Qing dynasty, which lasted 267 years. With his departure, two millenniums of empire, usually with a single individual dominating all of China, ended. Since then, the nation has moved toward an authoritarian system under Communist Party control, but has frequently changed leaders since the death in 1976 of Mao Zedong. Over recent decades, the party has observed a limit of two five-year terms—a system that has provided reasonable stability while also allowing some level of change. That era seems to be ending.

In an increasingly predicted maneuver, the Chinese Central Committee is likely to formally abolish the term limit on presidential power, creating the conditions for the incumbent, Xi Jinping, to remain in office indefinitely. Xi will also be bringing in his long-term associate Wang Qishan as vice president, further hampering younger officials from developing centers of political power. This has been foreshadowed for at least two years in a series of “power moves” by Xi, ranging from the harsh anti-corruption campaign (headed by the 69-year-old Wang) that eliminated many rivals, to his appearing in military garb at official events, emphasizing his control of the People’s Liberation Army.

While Xi had already established himself as the most powerful Chinese leader since Deng Xiaoping, this latest maneuver is still a radical change, presenting both opportunities and challenges his nation.

In terms of opportunity, Xi has demonstrated that he is a competent, serious, balanced leader who has improved the economy, enhanced China’s global reach, strengthened its already significant military capability, and reduced corruption—a significant set of achievements in the public’s eyes. With his potential to rule China for another decade or longer, China will experience a steady hand on the tiller of public policy.

Xi’s popularity is already strong, and this move—at least in the short term—will enhance his already powerful public persona. Finally, the 64-year-old Xi’s presumed longevity will provide China a leader with a clear, boldly stated strategic goal for its expanding role on the global stage. He laid this out in a major speech at the World Economic Forum in Davos, Switzerland, roughly a year ago.

But there will be challenges as well. No matter how competent and effective a leader he is, Xi will be faced with several knotty problems: a badly damaged environment; a super-heated real estate market; badly skewed gender demographics (far more men than women); geopolitical and international legal disputes over the South China Sea; and an aging population (as the saying goes, China will grow old before it grows rich). When growth begins to slow significantly, which it must over time, these irritants in the political and economic system will build up internal pressures and create political discontinuities, just as they always have in other authoritarian societies.

This presents the greatest risk for China. In the end, democracy, for all its flaws and shortcomings, is a safety valve for society when things become frustrating or go wrong—and something always goes wrong. Democracy allows the people to change leaders without bloodshed and anarchy. The Chinese people have been relatively content with their authoritarian system while hitting growth targets of 10 percent annually, building glittering new infrastructure, moving millions out of the countryside and into the urban settings, and lifting hundreds of millions of people out of poverty. But what will happen when internal pressures grow and there is no mechanism to change leaders?

From the U.S. perspective, Xi’s consolidation of power will make China an even more formidable competitor both within East Asia and globally. Countries in the neighborhood—most of which are U.S. allies, partners or friends—will see a single, powerful figure at the top of the Chinese leadership structure and be more inclined to enter into cooperative agreements with what they correctly view as a stable power. Globally, over the long term, authoritarian leaders also have advantages over the revolving door of real democracy. They gather decades of experience and can develop ambitious strategic plans that they will execute themselves.

Contrast this with the U.S. tendency to whipsaw in policy when we change administrations—look at Barack Obama and the Trans-Pacific Partnership trade agreement, followed by Donald Trump’s complete rejection of the treaty and tendency to blame China first for our economic problems. Washington will have to respond with an overarching strategy for dealing with China that transcends our individual administrations. This will be challenging but not impossible: the idea of containment against the Soviet Union (obviously not the right approach for China) in the Cold War, for example, was a consistent pillar of foreign policy for decades of presidents.

Perhaps most worrisome is the possibility that if Xi eventually comes under serious domestic pressure, he may be inclined to create external threats maintain his own popularity. Authoritarian leaders like Hugo Chavez in Venezuela and Vladimir Putin in Russia have done so, painting the U.S. as a nefarious enemy. A hypernationalist turn in Beijing could lead to confrontation between the U.S. and China, and a path toward the so-called Thucydides Trap, in which a rising power confronts an existing power—a dynamic that has led so often to war over the past 2,400 years. It will take diplomacy, economic cooperation and leadership on both sides to avoid this.

One of the most iconic novels in the long history of China was written in the mid-18th century: “The Dream of the Red Chamber” by Cao Xueqin. It is a huge, sprawling depiction of Chinese society under the Qing dynasty, when rival families fought for power in a complex hierarchy under a powerful emperor, with a vastly changing international environment as backdrop. The lesson is that influence rooted in friendship with the emperor (who is never actually named in this dreamy novel) is fragile and uncertain. Much as in the Red Chamber, leaders in China will have to maneuver in a deeply complex internal world, even as China emerges as a fully formed leading actor in the global scene. This will challenge Western democracies at every level. Let us hope we are ready.

This column does not necessarily reflect the opinion of the editorial board or Bloomberg LP and its owners.