– After weeks of threatening China with punitive restrictions and stiff tariffs, President Donald Trump is now siding with his more moderate economic advisers and looking to strike a deal to avert a devastating trade war.

The administration is considering easing up on one of China's largest telecommunications companies, ZTE, in exchange for China agreeing to buy more U.S. products and lift its own crippling restrictions on U.S. agriculture, people familiar with the deliberations said.

Trump defended the shift in a tweet Monday, saying that ZTE "buys a big percentage of individual parts from U.S. companies" and that the new stance was "reflective of the larger trade deal we are negotiating with China and my personal relationship with President Xi" Jinping of China.

The move is a sharp reversal from just two weeks ago, when the views of anti-China advisers within the Trump administration appeared ascendant. Trump, spurred on by Robert Lighthizer, the U.S. trade representative, and Peter Navarro, a top trade adviser, was pushing the United States toward a potential showdown with the Chinese over its economic behavior — a clash that had put many U.S. companies at risk.

During a trip to Beijing early this month, top U.S. officials handed their Chinese counterparts a lengthy list of demands to dramatically change their trade practices and curtail the state's role in the economy. The list, which included cutting their trade surplus with the United States by $200 billion, halting subsidies to advanced manufacturing and slashing their tariffs to the same level as the United States, took the Chinese by surprise, according to people familiar with the visit, and appeared to further chill relations between the two economic giants.

Trump now appears, at least for the moment, to be walking back from that tougher stance and seeking a quicker — and easier — resolution of trade conflicts with the Chinese.

The president's reconsideration of sanctions imposed on ZTE stems in part from Beijing's demand that the United States consider lifting the penalties before a visit by Liu He, a Chinese vice premier, who was expected to arrive in Washington this week for negotiations aimed at resolving the simmering trade conflict between the two countries. The Chinese made clear that Liu's visit was conditional on discussing the sanctions.

But the more moderate approach also stems from the more market-friendly views of two of Trump's favorite advisers, Treasury Secretary Steven Mnuchin and Larry Kudlow, who leads the National Economic Council.

Mnuchin has taken the lead role in recent weeks in pushing to resolve tensions and avoid potentially damaging tariffs and investment restrictions. He pressed for top officials to travel to China to try to resolve trade tensions, and helped fuel the president's focus on a deal revolving around reducing the United States' trade deficit with China, which Trump frequently denounces.

"Secretary Mnuchin has been pushing for a more conciliatory view to China for this entire period, certainly since the launch of the 301 investigation," Derek Scissors, a resident scholar at the American Enterprise Institute, said, referring to the section of trade law that authorized an investigation into whether China had illegally obtained U.S. intellectual property. "We see evidence that the Treasury Department does not want to impose investment sanctions on China as required by the original 301 findings."

A senior Treasury Department official said Mnuchin has had conversations with Trump and Commerce Secretary Wilbur Ross in recent days about China's ZTE concerns.

However, the official said a review of the Commerce Department's action against ZTE was not a precondition for trade talks.

Among the Trump economic officials, Mnuchin has been more encouraged by China's expressions of willingness to address the trade imbalance between the two countries and, because of his national security responsibilities, he considers the implications for North Korea nuclear talks when engaged in trade negotiations.

The Trump administration threatened ZTE's existence as a business last month, when the Commerce Department ordered a seven-year halt in U.S. shipments of computer microchips and software at the heart of most of ZTE's gear.

The move hit one of the United States' biggest telecom companies, Qualcomm, which lost the ability to export semiconductors to ZTE, one of its biggest customers. In China, Qualcomm's plan to acquire NXP Semiconductors had been stalled by a prolonged antitrust review, which many saw as retaliation for U.S. trade moves.

The Commerce Department's Bureau of Industry and Security accused ZTE of violating U.S. sanctions by selling to Iran and North Korea and then covering up the exports and rewarding the executives involved. ZTE has acknowledged it violated sanctions, but blamed the actions on poor internal controls rather than a deliberate defiance of the U.S. legal system.

ZTE, a 75,000-employee business that makes smartphones and cellphone tower equipment, began shutting down operations last week after it was unable to find alternative suppliers.

But in a surprise tweet Sunday, Trump held out the possibility of a reversal for the company.