President Donald Trump pledged on Sunday to help Chinese telecom giant ZTE return to business, days after the company said it would cease “major operating activities” because of the U.S. government’s recent trade restrictions, a dramatic shift in tone for a president who has long accused China of stealing U.S. jobs.

“President Xi of China, and I, are working together to give massive Chinese phone company, ZTE, a way to get back into business, fast,” Trump tweeted. “Too many jobs in China lost. Commerce Department has been instructed to get it done!”

The comment could presage a reversal of one of the Trump administration’s toughest actions to date against a Chinese company. Last month, the Commerce Department penalized ZTE for violating a settlement with the U.S. government over illegal shipments to Iran and North Korea, barring U.S. firms for seven years from exporting critical microchips and other parts to ZTE.

As a result, ZTE halted major operations, stressing in a statement Wednesday that it is “actively communicating with the relevant U.S. government departments in order to facilitate the modification or reversal” of the Commerce Department’s order.

Now the crisis for ZTE may be nearing an end, a development that stunned trade and national security experts. The Treasury Department and the Commerce Department had been strongly aligned against ZTE as recently as several days ago.

A high-level Chinese delegation was in Washington on Friday and raised the issue of whether the Trump administration could relax its stance on ZTE, but Trump’s announcement on Sunday in the Twitter post caught many of his advisers flat-footed as there had not been a broad agreement to change the administration’s approach, according to U.S. officials who spoke on the condition of anonymity because of the sensitivity of the matter.

It’s highly unusual for a president to personally intervene in a regulatory matter, which could undercut the leverage of Treasury and Commerce officials seeking to enforce sanctions and trade rules. It could send the signal to foreign leaders that anything can be put on the bargaining table as Trump seeks to cut trade deals, trade analysts said.

“It seems to cut across the concern about tech competition with China, supplying Iran, and jobs in China, so it all seems pretty confusing,” Adam Segal, the director of the Digital and Cyberspace Policy Program at the Council on Foreign Relations, said of Trump’s tweet. “That’s why everybody’s so flabbergasted by it. We’ve had from the beginning of this administration an increased drumbeat of warnings about ZTE and Huawei and the threat to U.S. security by having any of their products in the United States or U.S. supply chains.”

ZTE’s business in the United States has long raised concerns among national security officials. Shortly after Trump’s tweet, Rep. Adam Schiff, D-Calif., said, “Our intelligence agencies have warned that ZTE technology and phones pose a major cybersecurity threat. You should care more about our national security than Chinese jobs.”

In a statement, White House spokeswoman Lindsay Walters said, “The President’s tweet underscores the importance of a free, fair, balanced, and mutually beneficial economic, trade and investment relationship between the United States and China. The administration is in contact with China on this issue, among others in the bilateral relationship. President Trump expects [Commerce] Secretary [Wilbur] Ross to exercise his independent judgment, consistent with applicable laws and regulations, to resolve the regulatory action involving ZTE based on its facts.”

A ZTE spokesman also did not respond to an email seeking comment.

Meanwhile, Trump is trying to broker a historic agreement with North Korea in an attempt to denuclearize the Korean Peninsula. The president has said that his economic approach to China is linked to his national security strategy, and China plays an integral part in any decision made by North Korean leader Kim Jong Un.

Trump’s tweet on Sunday comes just days before U.S. officials are planning to meet with Liu He, one of Chinese President Xi Jinping’s closest advisers, to discuss the strained trade ties. That meeting is expected to be held in Washington this week or next.

Nevertheless, trade tensions between the United States and China remain sky high. Trump has proposed tariffs on as much as $60 billion in Chinese goods, and Beijing has responded in kind, prompting only continued threats from the president, who repeatedly lamented the trade deficit between the two countries during the 2016 presidential campaign. Recently, the Trump administration also has sought to limit the encroachment of Chinese telecommunications firms in the United States.

The U.S. government initially penalized ZTE in 2017, requiring it to pay $1.19 billion to settle charges that it violated U.S. sanctions in selling equipment to Iran and North Korea. As part of the settlement, ZTE also was required to punish employees involved in the matter and tighten its internal monitoring.

But U.S. officials said this year that ZTE didn’t discipline all the employees involved in the violations. “This egregious behavior cannot be ignored,” Ross said last month, as the U.S. announced its punishment to ban U.S. firms from supplying ZTE. The company, which is the fourth largest smartphone maker behind Apple, Samsung and LG, relies on microchips, glass and other parts from U.S. firms such as Qualcomm, Intel and Corning. ZTE generally makes inexpensive smartphones, which have grown in popularity in recent years.

“It was clear to me that there was a range of options between a handslap and ‘I destroy you as a company’ and Secretary Ross decided to go with ‘I destroy you as a company,’ ” said Chris Johnson, a former CIA analyst and a senior adviser at the Center for Strategic and International Studies.

In addition, the Defense Department in April ordered military exchanges to cease selling ZTE phones on U.S. bases. And the Federal Communications Commission recently moved toward prohibiting U.S. Internet providers that receive federal funds from spending them on equipment made by companies such as Huawei, another major Chinese telecom player.

It was difficult to pinpoint what led to Trump’s tweet on Sunday. ZTE has been active in seeking to change the president’s mind. It has been working with the law firm Hogan Lovells, among others, who sought advice from people close to the administration, according to a person familiar with the matter, speaking on condition of anonymity to speak freely about the matter. In 2017, ZTE paid the Podesta Group $250,000 for lobbying as well as $200,000 to a firm called Appo-G LLC. This year it has continued to pay Appo-G and its lobbyist Jon Christensen $50,000.

The counsel the company received was that it should alter its board of directors, change corporate governance, and make sure that Chinese President Xi Jinping was informed in case Trump brought the issue up in a phone call with the Chinese leader, the person said.

It was not clear if Commerce officials were consulted on the President’s tweet. A spokesman for the Commerce Department did not respond to a request for comment Sunday.

“This whiplash-like approach to the Commerce Department’s exercise of such far-reaching authority is unusual and unwise, particularly if it wasn’t the product of careful interagency discussion and analysis weighing all the pros and cons,” said David Laufman, a former Justice Department official responsible for the criminal enforcement of U.S. export control and sanctions laws.

Trump’s international economic policies have been marked by ultimatums and threats that are frequently followed by exemptions and reversals. Foreign leaders often do not know whether he will follow through on something he vows to do or whether he will back down.

For example, he has said that he would impose tariffs on steel and aluminum imports, but he has temporarily exempted Canada, Mexico, the European Union and several other countries while leaving China and Japan searching for answers.

His advisers have launched official or unofficial trade discussions with numerous countries, and these talks are wrapped in uncertainty because it is unclear whether Trump will follow through on promises to impose tariffs, even if they might raise prices for U.S. consumers.

But nowhere is the United States’ trade relationship as complicated as with China. During the campaign, Trump blasted China for what he alleged was a pattern of cheating through currency devaluation and other measures to steal American jobs and hurt U.S. workers.

The United States buys more than $500 billion in goods from China each year, but Trump has proposed to force China to buy an additional $200 billion in goods from the United States.

Several weeks ago, as tensions between the White House and Beijing escalated, both sides promised to impose increasingly severe trade restrictions on the other, spooking financial markets amid fears of a trade war.

Chinese leaders have tried to resist Trump’s demands, but in recent weeks they have shown a willingness to negotiate. The economies are inextricably linked, as China relies on U.S. consumers to buy many of its products, and the United States relies on Chinese producers for a range of goods.

Trump has repeatedly cited a “friendship” with Xi, though they’ve met only a few times, and he has said that this relationship will endure no matter what happens with the trade talks.

Hours after his initial tweet on Sunday, Trump issued a second remark on the matter on Twitter: “China and the United States are working well together on trade, but past negotiations have been so one sided in favor of China, for so many years, that it is hard for them to make a deal that benefits both countries. But be cool, it will all work out!”