"When you strike at a king you must kill him," Ralph Waldo Emerson once said. Well, this year China tried to strike at President Trump for daring to launch a trade war with Beijing -- and missed the mark entirely.

After Trump imposed massive tariffs on Chinese goods earlier this year, Beijing responded in June with what appeared to be a clever strategy: targeting retaliatory tariffs against Trump voters in rural farming communities across the United States. China is the largest importer of U.S. soybeans, buying $14 billion of them in 2017. Three of the biggest soybean-producing states, Indiana, Missouri and North Dakota, not only voted for Trump, but also in the 2018 midterms had Democratic senators, Joe Donnell, Ind., Claire McCaskill, Mo., and Heidi Heitkamp, N.D., who were up for reelection. If Beijing imposed painful tariffs on soybeans, Chinese leaders likely calculated, they could create a rift between Trump and rural voters who put him in the White House, give Senate Democrats a boost and force Trump to back down.

But Trump did not back down. He countered by announcing $12 billion in aid for farmers, threatened to increase his tariffs on Chinese goods and asked his rural base to stick with him while he faced down the economic predators in Beijing. That is exactly what they did. Far from abandoning the president, rural voters hurt by Chinese tariffs rallied around Trump and the GOP. They threw Donnelly, Heitkamp and McCaskill out of office, allowing Republicans to expand their Senate majority. And while Republicans lost control of the House, few of the GOP losses came from rural districts. Competitive rural districts mostly ended up staying Republican; it was the urban-suburban districts that flipped to the Democrats.

MARC THIESSEN: WHAT TRUMP NEEDS TO DO TO AVOID BEING A ONE-TERM PRESIDENT

China's tariff ploy didn't just fail to sway the 2018 midterms; it actually backfired. The tariffs made the U.S. soybeans that China depends on more expensive, and Beijing soon found that alternative suppliers in South America could not produce enough to meet Chinese demand, leading to shortfalls.

In other words, China went for a kill shot -- and ended up shooting itself in the foot.

That has emboldened Trump in his negotiations with Chinese President Xi Jinping -- as shown by news this week that a senior executive of Chinese telecommunications giant Huawei had been arrested in Vancouver, at the request of the United States, on charges of violating sanctions on Iran. China demanded her release but nonetheless affirmed that it will still observe the 90-day tariff cease-fire Trump and Xi reached during their meeting last week in Buenos Aires -- putting off a scheduled Jan. 1 escalation of U.S. tariffs from 10 percent to 25 percent on $200 billion of Chinese goods while the two sides negotiate a deal.

Trump has leverage going into those talks. The U.S. economy is booming, while China has just posted its weakest growth in nearly a decade. Moreover, during the Group of 20 meeting in Argentina, Xi saw how Trump has been able to bend his trade rivals to his will, and deliver trade victories for his working-class political base, when he held an elaborate signing ceremony for the new U.S.-Mexico-Canada trade agreement.

China will of course be a much tougher adversary than Mexico or Canada. As my American Enterprise Institute colleague Derek Scissors points out, the Chinese Communist Party controls the economy through state ownership and massive subsidies in dozens of sectors where U.S. goods and services can't compete fairly. Lifting tariffs is easy. Getting China to change its entire industrial policy will be hard -- as will stopping China's theft of U.S. intellectual property.

But Trump knows that he has no chance of doing so by filing complaints with the World Trade Organization. So Trump is playing a game of chicken with Xi, appearing to calculate that the United States is in a better position to survive an all-out trade war. The markets panicked this week over Trump's recent pronouncement that he would be just as happy imposing tariffs as cutting a deal with China, but getting this message through to Xi is the only way to force his hand. As Trump tweeted this week, "We are either going to have a REAL DEAL with China, or no deal at all -- at which point we will be charging major Tariffs against Chinese product being shipped into the United States," adding, "remember … I am a Tariff Man."

He means it. Trump actually believes that tariffs are good for the U.S. economy. The question is whether Xi believes he believes it. The answer may determine whether we get a deal or a trade war.

CLICK HERE TO READ MORE FROM MARC THIESSEN