ZTE looked in serious trouble last week when the Chinese tech giant announced it had "ceased major operations" following a ban that prevents US companies from selling hardware and software to the firm. But it may have found an unlikely savior in the form of Donald Trump, who tweeted that he was working with Chinese president Xi Jinping to find a way for ZTE to "get back into business, fast."

The Commerce Department banned US companies from selling to ZTE for seven years last month. The penalty came after ZTE broke a plea agreement following last year's admission that it violated sanctions by selling US-made technology to Iran and North Korea.

25 percent of ZTE's components come from US firms, such as Intel and Qualcomm. It said the ban "will not only severely impact the survival and development of ZTE, but will also cause damages to all partners of ZTE including a large number of US companies."

The situation was an escalation in the trade dispute between China and the US, but Trump's tweet could see a thawing of relations between the countries. The president's reversal comes as US officials prepare for talks with top Chinese trade official Liu He in Washington.

ZTE paid over $2.3 billion to 211 US exporters in 2017, and the company has over 80,000 employees. Part of Trump's tweet reads, "Too many jobs in China lost."

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."

Several hours after his first tweet, Trump posted another message assuring people that "it will all work out."

The tweets appear to have divided opinion. Some analysts welcome improved ties between the US and China, while others maintain that ZTE technology poses a threat to national security, and that tough sanctions against the firm should remain in place.