On Monday, the United States military informed the government of Iraq that U.S. forces would begin their pullout from that country, 16 years after the “shock and awe” of our 2003 invasion. Also on Monday, that United States military said that the letter announcing the departure was released by mistake and did not reflect U.S. policy. Also on Monday, the Chinese ambassador met with the prime minister of Iraq and informed him that China would be willing to provide military support to that country should they desire it.

The last of those three stories shows how a superpower in its ascendancy behaves. The other two are just more low comedy from the folks who are currently bringing you U.S. national security policy.

The juxtaposition is not an accident, though it can hardly be said that any of it was intentional on the part of the U.S. government. Following the Jan. 3 attack that killed Iranian General Qassem Soleimani, the Iraqi parliament voted to expel U.S. troops from the country. This was just one of many unintended consequences of the Soleimani attack. In just three days, there were many.

Massive crowds took to the streets in Iran to mourn and protest the loss of Soleimani—a man, it must be acknowledged, whose death should hardly be lamented given the blood on his hands from years of overseeing Iran’s Revolutionary Guards. An Iran that was in recent weeks divided by protests over rising gas prices was suddenly once again united in its hatred for the U.S. An $80 million price was put on Donald Trump’s head. Iran vowed to proceed with enriching uranium above levels agreed upon in the Obama-era nuclear accord that Trump had earlier abandoned. Oil prices spiked upward. America’s allies distanced themselves from the U.S. action—including Iran’s two most outspoken enemies, Saudi Arabia and Israel. Other world leaders of whom Trump has been solicitous, including those in Russia and Turkey, as well as China, condemned the U.S. action. While congressional leaders including the speaker of the House were not briefed on the attack beforehand, Trump’s family and holiday visitors to Mar-a-Lago were given a heads up.

Trump was reportedly given multiple options with regard to punishing Iran for recent attacks on Americans and chose the one planners considered to be so outlandish as to be out of the question—the “extreme” option designed to make the others look reasonable. Following the attack, Trump compounded the confusion with threats to sanction the Iraqis if they kicked out U.S. troops and to attack Iranian cultural sites in violation of international law, threats that drew leaks about how uncomfortable the military leadership was with Trump’s apparent willingness to commit war crimes. Normal national security planning procedures were sidestepped. The president consulted few of his aides, although he did engage in planning sessions at Mar-a-Lago with his National Security Adviser Robert O’Brien, a former corporate lawyer and (by far) the least qualified person ever to run the National Security Council apparatus. Secretary of State Mike Pompeo went on television to say that the massive ratcheting up of tensions with Iran caused by hitting one of its top leaders—an option two prior presidents had decided was too risky because of the potential unintended consequences it might unleash—was actually consistent with “de-escalation.” Escalation was de-escalation. It would have made George Orwell’s head spin. And then, within hours the U.S. military was pulling out of Iraq. And then it was not.

It was enough to make two commentators with strong right-leaning pedigrees, Richard Haass of the Council on Foreign Relations and Jennifer Rubin of the Washington Post, both use the term “strategic incoherence.” They did that because they are more polite than I am. Because it is impossible not to look at the combination of bad planning, impulsive, uninformed leadership behavior, terrible judgment, failures of both public and private diplomacy, and lack of consideration of consequences and describe it as anything other than strategic clusterfuckery.

That it stands out in recent U.S. foreign policy history for this characteristic is saying something. Because even when the U.S. plans carefully, the president surrounds himself with qualified advisers and then listens to those advisers, allies are consulted, processes are adhered to, and international standards of behavior are followed, the U.S. has a really bad track record with Middle East foreign policy. Like really bad. Like we suck at it. From the overthrow of the Mosaddegh regime in Iran in 1953, the original sin of bad U.S. relations with Iran and the result of misguided, oil-driven policies we inherited from the British, through the Iran hostage crisis, through propping up Saddam Hussein as a counterweight against Iran (even going so far as to provide intelligence support for Saddam’s use of poison gas against the Kurds), through the first Gulf War to the disastrous invasion of Iraq that George W. Bush began in 2003, through Obama’s muddled and ultimately failed Syria policy, through Trump’s serial errors from pulling out of the JCPOA to embracing extremist Israeli ethno-nationalism to selling out the Kurds, America’s period as the foreign power most engaged in the Middle East was every bit as unsuccessful and much bloodier than the British catastrophes that led up to it.

Which brings us to that meeting between Chinese Ambassador Zhang Taon and the caretaker Iraqi Prime Minister Adil Abdul-Mahdi. Zhang’s assertion that China was eager to offer Iran more military and security support might be seen merely as a bit of deft opportunism by the Chinese. But it is more than that. It is part of a major shift in the geopolitics of the Middle East that has been brought on in part by China’s rise, in part by its dependence on Middle Eastern oil, and in part by America’s misadventures and waning appetite for Middle East involvement.

In 2019, the Iranian Prime Minister Mohammad Javad Zarif visited Beijing four times. Last month, the Chinese held joint naval exercises in the Indian Ocean and Gulf of Oman with Russia and Iran. They called the operation “Marine Security Belt”—a reference to China’s “Belt and Road Initiative” which in part is conceived to ensure Chinese links to important international markets and resources. China’s first military facility outside its own borders was opened in Djibouti, strategically close to the Middle East, in 2017. Massive investments in Pakistan, including in infrastructure projects and in China’s largest embassy in the world, indicate that it will also play a strategic role in China’s more active, forward-leaning involvement in the region. That includes another naval port facility in Gwadar.

China has embarked on intensified “comprehensive strategic partnership” relations with Iran, Saudi Arabia, the UAE and Egypt. It is a top trading partner of all those countries and the No. 2 trading partner of Israel after the U.S. It is investing heavily. And while in the past China has shown an inclination to keep the relationships on a strictly business basis, the strong statements from the Chinese in the wake of the Soleimani attack, the naval exercises, and the military bases all show that they are willing to engage in a more forceful way diplomatically or otherwise. At the same time, many regional leaders are looking to America’s withdrawal and concluding it is better to hedge their bets. Some, like Turkey’s Erdogan, Syria’s Assad, the Iranians, and the Israelis have done this with the Russians. But none can overlook the reality that China is the world’s other true superpower and the only one that is, at the moment, rising in influence.

It is far too early to tell what aftershocks will be triggered by the Trump’s strike against Soleimani. Retaliation is certain perhaps on many levels including cyberattack, terrorism, uses of force against U.S. military personnel, or action to impede the access of U.S. and allied vessels to the Persian Gulf. Whether the unintended consequences of the attack were high enough to justify past administrations’ reluctance to act as Trump remains to be seen. My guess is they will.

That is because this rash decision—made, it seems, like so many others for reasons that might narrowly benefit Trump politically in his battle for survival at home—is likely to weaken America’s standing further in the region. As we “redeploy” and ultimately draw down forces in Iraq and Afghanistan, we create a void that will be seized upon by others. Those will include both rivals and enemies—from ISIS to Russia, from Iran to China. But of all those others, it is China that is riding a wave of historical momentum that seems certain to make it the next major foreign actor in the Middle East.

China, therefore, would be well advised to consider America’s recent history in the region—and that of Britain, France, Russia and the Ottomans before them. Having great “influence” in the Middle East is often an illusory prize that comes at a very high cost. Of course, one thing we know about the Chinese is that they are doing the planning and strategic analysis for their next moves in this volatile part of the world that this American president and his immediate predecessors have been so bad at.

David Rothkopf is a visiting scholar at the Carnegie Endowment, host of “Deep State Radio,” and CEO of The Rothkopf Group, an advisory firm providing services in the areas of technology, education, and culture to public and private clients from around the world, including the United Arab Emirates. He is also the author of Running the World: The Inside Story of the National Security Council and the Architects of American Power.