Two weeks into Donald Trump’s presidency, and he’s already reshaped America’s role in the world. Our presence on the global stage is shrinking, and we will come to regret it.

One of Trump’s first actions as president was to sign an executive order withdrawing the U.S. from the Trans-Pacific Partnership, a multination Pacific Rim trade deal including Japan, Peru and Vietnam.

The Obama administration painstakingly negotiated TPP, as the trade deal was known, over the course of years. It would have established the U.S., not China, as the critical trading partner for many smaller Asian nations. It also contained a number of important protections for American workers and for the health of the environment.

No more. A multination Pacific Rim trade deal will still go forward, but the odds are now overwhelming that the critical trade partner will be China, not the United States. Malaysia and Thailand have both urged a speedy conclusion to the Regional Comprehensive Economic Partnership, China’s own Pacific trade initiative.

While the Trump administration has been floating the idea of imposing tariffs on imports from Mexico — currently America’s third-largest trade partner — Chinese President Xi Jinping has been talking up globalization and free trade.

Jinping has been a reluctant global presence, so it was a surprise to many when he appeared on the main stage of the World Economic Forum’s annual meeting in Davos, arguing that globalization has “powered global growth and facilitated movement of goods and capital, advances in science, technology and civilization, and interactions among people.”

This is the kind of statement that any other American president in modern history would have made, but times have changed. Now it’s China that’s assuming a more powerful global role, and it’s rethinking its relationship with the U.S.

There are many confrontations simmering in China’s backyard — North Korea’s nuclear and missile programs, for example, present a clear and present danger to the world — and if China can’t depend on the U.S., it will invest more in its own defense. Some Chinese officials already understand that increased defense investment could also come in handy should President Trump attempt a trade war.

Closer to home, Trump has also pulled the U.S. away from one of our most important allies: Mexico.

Despite Trump’s insulting language during the campaign about Mexicans, and his determination to build a wall, Mexican President Enrique Peña Nieto was willing to meet with Trump soon after he took office. The offer made sense — in addition to being a major trade partner, Mexico is a crucial ally for the U.S. on national security and counter-narcotics.

Then Trump tweeted that Peña Nieto should cancel their meeting if Mexico isn’t willing to pay for a border wall. It was a needless provocation and proof that the Trump administration has lots to learn about diplomacy. Peña Nieto canceled the meeting — and watched his poll numbers rise in his own country.

It’s a bad idea for the U.S. to antagonize Mexico, for many reasons. Perhaps the biggest reason is immigration, an issue Trump appears to take very seriously. Immigration is a multifaceted phenomenon, but Mexicans have historically had economic reasons for immigrating to the U.S.

If Trump is interested in having less Mexican immigration to the U.S., it’s in his interest to have a stable and prosperous Mexico, not one that’s damaged by trade wars and resentful of his insults.

Trump also reportedly had a testy phone call last week with Australian Prime Minister Malcolm Turnbull, supposedly telling Turnbull that the refugee deal his country struck with President Barack Obama was the “worst deal ever” and could result in terrorists entering the U.S.

Like it or not, the U.S. needs other countries — as military allies and economic trading partners. Australia has been one of our most reliable allies in war and counterterrorism efforts.

Trump won partially on a promise to renegotiate America’s global deals, and perhaps some of America’s global deals need to be fixed.

But as anyone with a background in global diplomacy could tell Trump, there’s no need to go out of your way to antagonize someone with whom you’re attempting to negotiate. Alienation of allies should be deleted from his “America First” playbook.