Donald Trump may be famous -- among other things -- for his book "The Art of the Deal." But last week Japanese Prime Minister Shinzo Abe schooled the obsessively transactional U.S. president on how a real deal is done.

With Chinese trade talks in tatters, U.S. farmers fuming over tariffs and impeachment now a live threat, Trump was desperate for a win on the global stage. Any win would do. Abe's team exploited Trump's anxiety and time pressures to score an artful dodge for Asia's number-two economy.

Trump can claim negotiating supremacy all he wants, but Abe pretty much gave him only what Barack Obama got back in 2016 when he was president.

Don't take my word for it. As Wendy Cutler, a key negotiator of the Trans-Pacific Partnership, tweeted: "Glad to see our President calling the Japan trade deal 'phenomenal.' Has anyone broken the news that it's amazingly similar to the provisions and market access commitments of TPP!!"

The #minideal hashtag trending on Twitter said it all. The pact on agriculture, notes Tobias Harris of strategic consultancy Teneo Intelligence, is "for the most part the same with TPP." Notable exceptions include rice, where the pact is in Japan's favor. The digital trade opening -- which lowers levies on transmitted videos, music and software -- mirrors TPP, while cuts in industrial tariffs here and there mean little pain for Abe's economy.

So far, the trade team led by Toshimitsu Motegi, now Abe's foreign minister, has quietly but firmly got the better of Trump's. In August, Motegi told Lighthizer: "You are the ones who want a quick agreement. I'm only offering things I can deliver on."

Days later, China's move to retaliate with $75 billion of tariffs on U.S. goods played right into Tokyo's hands. Team Trump blinked, dropping demands for low-tariff quotas on dairy and other products beyond what Japan accepted under TPP.

This slimmed-down deal matters, of course. Trump gets to tout selling more beef, cheese, corn, pork, wheat and wine: in theory, the pact reduces tariffs on $7.2 billion of agricultural goods. Abe gets Trump off his back for a while -- and wins a key bargaining chip. When Trump needed a victory the most, his pal Abe delivered.

Yet the accord, cobbled together in extreme haste, ignored the most contentious question: whether Trump will go ahead with 25% import taxes on cars and auto parts. It is less than comforting that U.S. officials qualified reassurances there was no plan to devastate Japan Inc. with the words "at this point."

Trump's lead negotiator, Robert Lighthizer, said: "In the fairly near future we are going to be having a lot more very comprehensive deals signed with Japan."

That is code for autos, a Trump obsession dating back to the 1980s. Back then, as Trump created the world's-greater-negotiator myth with his ghostwritten "Art of the Deal" memoir, he railed against the Japanese. At the time, lawmakers warned the U.S. risked becoming a "colony" of Japan. Pundits like columnist and radio host Paul Harvey warned of an "economic Pearl Harbor."

In a 1989 television appearance, Trump complained Japan had "systematically sucked the blood out of America -- sucked the blood out! It's a huge problem, and it's a problem that's going to get worse. And they're laughing at us."

Abe's first go at trade negotiations with Trump has gone reasonably well. But act two matters much more. A 25% tariff could cost Toyota and other Japan Inc. auto giants $4.64 billion. The fallout for Asian supply chains would amplify the economic losses. The uncertainty makes it even less likely Japanese CEOs will raise wages, kicking off the virtuous reflationary cycle Abe desires.

Tokyo is not without leverage. Abe could subtly threaten the U.S. auto industry: "It would be a shame if those millions of jobs Toyota, Honda and Nissan generate in Alabama, Tennessee and other Trump states suddenly left for Mexico."

Tokyo could also remind Trump that it is the biggest holder of U.S. Treasurys, with $1.13 trillion -- for the moment.

The questions are when and how Trump returns to the stage. If his impeachment troubles intensify, he could assume an adversarial stance with Tokyo. He may see even bigger and more disruptive trade brawls with Asia as his best bet for reelection in 2020. This "still leaves a dark cloud" over Japan's 2020, says Scott Seaman of risk advisory business Eurasia Group.

Japan needs to brace for Trump's second act, one that could pack more thrills and spills than global markets can handle.

William Pesek is an award-winning Tokyo-based journalist and author of "Japanization: What the World Can Learn from Japan's Lost Decades."