The liberal arts may be in decline on college campuses, but they are enjoying a resurgence in the White House, as its staff is reportedly reading Thucydides’ history of the Peloponnesian war, a 2,500-year-old account of the war between Athens and Sparta.

The sudden interest in the ancient conflict has much to do with its parallels with the United States’ rivalry with an ascendant China. Athens’ rise in power stirred fear in Sparta, an established ruling power, and the two nations ultimately went to war. This dynamic of a rising power threatening the hegemony of a ruling power could lead the U.S. and China into what scholars refer to as the “Thucydides’ trap.”

President Donald Trump objected to China’s rising power early in his presidential campaign, blaming China for taking American jobs and manipulating its currency to achieve an unfair trade advantage. Over Chinese objections, the Trump administration approved the sale of $1.4 billion in armaments to Taiwan and has threatened tariffs on Chinese products and a trade case against China for its practices on intellectual property, which might usher in a trade war.

Trump has pressured China to curb North Korea’s nuclear program, and while China supported U.N. sanctions on North Korea, there is no indication that North Korea’s nuclear program is slowing down. Disputes over North Korea, the South China Sea, Taiwan, trade, cybersecurity, intellectual property, human rights and a myriad of other issues might spark a conflagration between the U.S. and China.

The U.S. with its strong economy and military might has been the world’s dominant power since the end of World War II — and even more so after the break-up of the Soviet Union. Its presence in Asia offered stability for Japan, India, South Korea and China to build robust economies. But like British dominance at the end of the 19th century, America’s role in the world, particularly in Asia, will likely shift in the 21st century.

Napoleon said, “China is a sleeping giant. Let her sleep, for when she wakes she will shake the world.” When President Richard Nixon visited China in 1972, the country had long been isolated from much of the world. When it adopted a market economy and became the world’s leading manufacturer, its economy grew at double digit annual rates. Today, its economy is arguably larger that of the U.S., when comparing their relative purchasing power.

China’s population has a better than 4 to 1 advantage over the U.S., and its economy is growing three times faster than the U.S. economy, leaving little doubt that China will enjoy increasingly greater economic power as the 21st century unfolds. The United States’ military annual expenditures dwarf China’s by nearly 3 to 1, but China has 60 percent more military personnel, and a rapidly growing economy allows it to devote a smaller percentage of its gross domestic product to achieve military parity with the United States.

Chinese President Xi Jinping’s “One Belt, One Road” initiative proclaims the rise of China as it extends its influence throughout Asia, Africa and Europe in the form of transportation, technology and infrastructure projects to increase trade and strengthen relationships. Today, China flexes its economic might with this $1.4 trillion initiative that will touch more than half of the world’s population and one-third of the world’s economy.

Xi and Trump seek to make their countries great again. In China’s case, Xi aims to restore the “Middle Kingdom” to a place of prominence in the world. Memories of the century of humiliation, from the Opium Wars to the Japanese conquest, linger in the Chinese mind. The slogan “never again” underlies the Chinese quest for power, wealth and prestige.

Harvard professor Graham Allison cautions in his book “ Destined for War” that a rupture in the relationship between the U.S. and China is more likely than acknowledged and argues that both countries will have to take challenging steps to avert hostilities. His book looked at 16 instances over the last 500 years when an upstart country disrupted the dominance of an established power. War broke out in 12 of those cases.

Trump and Xi reportedly have a warm personal relationship, but so did the leaders of Athens and Sparta, who recognized that war was not in their best interests. Hubris, fear and paranoia proved more powerful than rational thought, as both sides exhibited misplaced confidence and persuasive partisans aroused national pride that rendered any attempt at peace a sign of weakness.

China’s rise does not have to lead inexorably into the Thucydides’ trap. The Greek historian taught that choices rather than fate shape our destiny. By learning from Athens and Sparta, the U.S. and China can avoid the Thucydides’ trap only by choosing a more constructive path to the future.

Joseph W. McDonnell is a professor of public policy and management at the Edmund S. Muskie School of Public Service at the University of Southern Maine in Portland. He is also the director of the USM Confucius Institute.