(Reuters) - China’s No. 2 telecommunications equipment maker ZTE secured a lifeline from the Trump administration on Thursday after agreeing to pay a $1 billion fine and overhaul leadership in a deal that will lift a ban on its doing business with U.S. suppliers.

The agreement comes as U.S. President Donald Trump seeks trade concessions from China and negotiations continue to avoid a trade war between the world’s two largest economies.

Shares of U.S. companies that do business with ZTE rose on Thursday.

U.S. lawmakers immediately attacked the agreement, citing intelligence warnings that ZTE poses a national security threat.

ZTE pleaded guilty last year to conspiring to evade U.S. embargoes by selling U.S. equipment to Iran. The ban on buying U.S. parts was imposed in April after the company lied about disciplining some executives responsible for the violations. ZTE then ceased major operations.

Under the deal, ZTE will change its board and management within 30 days, pay a $1 billion fine and put an additional $400 million in escrow. The deal also includes a new 10-year ban that is suspended unless there are future violations.

“We will closely monitor ZTE’s behavior,” Ross said in a statement. “If they commit any further violations, we would again be able to deny them access to U.S. technology as well as collect the additional $400 million in escrow.”

Reuters reported exclusively on Tuesday that ZTE had signed a preliminary agreement with the Commerce Department, along with the fine and other terms.

Ross said the penalty is the largest the Commerce Department has ever levied.

The agreement does not take effect until ZTE pays the $1 billion fine and puts the $400 million in escrow, which is likely to take at least a few days, according to a person familiar with the matter.

ZTE did not immediately respond to requests for comment on Thursday.

Under the new agreement, ZTE must also retain a compliance team selected by the Commerce Department for 10 years. The company already has a U.S. court-appointed monitor.

#VeryBadDeal

U.S. senators said they plan legislation to roll back the agreement.

“I assure you with 100 percent confidence that #ZTE is a much greater national security threat than steel from Argentina or Europe,” Republican U.S. Senator Marco Rubio tweeted with the hashtag #VeryBadDeal.

U.S. intelligence agencies have concluded that ZTE poses a “significant” national security threat.

“ZTE is a state-controlled telecommunications company that poses significant espionage risks, which this agreement appears to do little to address,” U.S. Senator Mark Warner, the top Democrat on the Intelligence Committee, said in a statement.

A sign of ZTE Corp is pictured at its service centre in Hangzhou, Zhejiang province, China May 14, 2018. REUTERS/Stringer

Senate Democratic leader Chuck Schumer called the agreement “a 180-degree turn away from the president’s promise to be tough on China.”

Eric Hirschhorn, a former U.S. undersecretary of commerce who had been involved in the ZTE case, said “the government is merely setting a price for doing business instead of giving them the punishment they deserve.”

A U.S. investigation into ZTE was launched after Reuters reported in 2012 the company had signed contracts to ship hardware and software worth millions of dollars to Iran from some of the best-known U.S. technology companies. (reut.rs/2GbpCmO)

The probe found that ZTE bought U.S. components and incorporated them into its equipment, illegally shipped them to Iran, and devised elaborate schemes to hide the illegal activity. The company pleaded guilty in U.S. District Court in Texas last year.

Shenzhen-based ZTE has a subsidiary in Richardson, Texas.

ZTE’s survival has been a topic of discussion in high-level U.S.-China trade talks. Trump tweeted on May 14 that he and Chinese President Xi Jinping were working together to help ZTE “get back into business, fast.”

Trump met with his trade advisers on Tuesday to discuss China’s offer to import an extra $70 billion of American goods over a year in hopes of defusing a potential trade war between the world’s two largest economies.

One of the U.S. companies caught in the international crossfire is Qualcomm Inc, whose products account for the lion’s share of chips inside ZTE smartphones. Separately, Qualcomm is trying to get Chinese approval for its pending $44 billion acquisition of NXP Semiconductors NV.

Qualcomm Chief Executive Officer Steven Mollenkopf said on Thursday he hoped the ZTE agreement would pave the way for the NXP approval. Shares of Qualcomm Inc rose as much as 4.7 percent while NXP jumped as much as 6.7 percent.

ZTE supplier Oclaro Inc was up 1.3 percent while Acacia Communications Inc was down 0.6 percent. Oclaro got 18 percent of its business from ZTE last year, while 30 percent of Acacia’s total revenue was from ZTE.