For the last month, Chinese smartphone giant ZTE has been largely shut down after the Trump administration banned US firms from selling it technology. But now ZTE has made a deal with the Trump administration allowing it to re-open. Reuters first reported the deal yesterday, and it was confirmed by US Commerce Secretary Wilbur Ross today.

Trade War! USA v. China Top memory and display suppliers drop Huawei after new US restrictions

China plans new data policy in response to Trump admin’s “bullying”

TikTok sues Trump admin., says ban is unconstitutional and political

Chip and phone supply chain shaken as Huawei faces mortal threat

Trump declares TikTok, WeChat “national emergency,” preps bans View more stories Reviving ZTE has been a personal focus for President Trump, whose government is in the middle of broader trade negotiations with the Chinese government. Last month, Trump tweeted that he was looking for a way for ZTE to "get back into business, fast" because there were "too many jobs in China lost" from ZTE's shutdown.

According to Ross, the deal includes a $1 billion fine as well as $400 million held in escrow to deter ZTE from further misconduct. ZTE will have 30 days to change its board of directors and executive team.

"We are literally embedding a compliance department of our choosing into the company to monitor it going forward," Ross told CNBC.

The terms of the new deal are similar to the those Trump outlined in a May 25 tweet, saying that ZTE might reopen "with high level security guarantees, change of management and board, [and it] must purchase U.S. parts and pay a $1.3 Billion fine."

ZTE's dispute with the US government stems from allegations that the Chinese company sold technology to North Korea and Iran in defiance of US sanctions. Last year, ZTE settled the case with the US government, promising to pay $890 million in fines and punish dozens of ZTE executives who orchestrated the illicit technology sales.

But early this year, the US government discovered that ZTE had not followed through on its promise. According to Trump administration officials, ZTE gave many of the wayward executives their full 2016 bonuses and then lied about it to the US government. So the US went nuclear on ZTE, imposing a seven-year ban on US companies selling technology to the Chinese firm.

That was a serious problem for ZTE because the company is heavily dependent on US components for its smartphone business. ZTE phones include chips from Qualcomm and the Android software stack from Google. While the core Android operating system is open source, Google has retained control over the Android app store. And without access to Google's app store and other-Google made apps, an Android phone isn't very useful.

So for the last month, ZTE has been desperately looking for a way to get back into business. It has enjoyed the backing of Chinese President Xi Jinping, who has been negotiating with Trump over a broader trade agreement.

Update: this post has been modified to reflect confirmation of the deal by Commerce Secretary Wilbur Ross