NEW YORK/HONG KONG (Reuters) - Chinese telecom equipment maker ZTE Corp has agreed to plead guilty and pay nearly $900 million in a U.S. sanctions case, drawing a line under a damaging scandal that had threatened its cut off its supply chain.

While the fine was larger than expected, ZTE, also a major smartphone maker, reported robust underlying earnings for 2016 and was upbeat in estimates for the first quarter. That and the resolution of the case helped its Hong Kong-listed shares surge 6 percent.

A five-year investigation found ZTE conspired to evade U.S. embargoes by buying U.S. components, incorporating them into ZTE equipment and illegally shipping them to Iran.

In addition, it was charged in connection with 283 shipments of telecommunications equipment to North Korea.

“ZTE Corporation not only violated export controls that keep sensitive American technology out of the hands of hostile regimes like Iran’s, they lied ... about their illegal acts,” U.S. Attorney General Jeff Sessions said in a statement.

ZTE relies on U.S. suppliers for 25 percent to 30 percent of its components, many of which are key to its goods. It purchases about $2.6 billion worth of components a year from U.S. firms, according to a company spokesman. Qualcomm, Microsoft and Intel are among its suppliers.

“ZTE acknowledges the mistakes it made, takes responsibility for them, and remains committed to positive change in the company,” ZTE Chief Executive Zhao Xianming said in a statement.

The company agreed to a seven-year suspended denial of export privileges, which could be activated if there are further violations, as well as three years of probation, a compliance and ethics program, and a corporate monitor.

It also agreed to an additional penalty of $300 million that will be suspended during the seven-year term on the condition the company complies with requirements in the agreement.

When asked about the ZTE case, Chinese Foreign Minister Wang Yi said relevant departments of the government would continue to pay attention as to whether Chinese firms were receiving fair treatment.

“The Chinese government consistently opposes foreign governments putting unilateral sanctions on Chinese companies. At the same time, we have always asked our companies to operate legally abroad,” he told a news conference without elaborating.

Tim O’Toole, a Washington D.C.-based lawyer with Miller & Chevalier specializing in sanction cases, said U.S. court documents suggest ZTE’s attempts to obstruct the investigation were the main reason for a penalty significantly higher than in similar cases.

“What seems really important to U.S. regulators is whether a company or individual after the investigation starts is seen to continue to evade the sanctions and also obstruct the investigation,” he said.

Slideshow ( 5 images )

The investigation, spearheaded by the U.S. Department of Commerce, followed reports by Reuters in 2012 that ZTE had signed contracts to ship millions of dollars worth of hardware and software from some of the best-known U.S. technology companies to Iran’s largest telecoms carrier.

Last year, the Commerce Department released internal documents showing senior ZTE executives instructing the company to carry out a project for dodging export controls in Iran, North Korea, Syria, Sudan and Cuba.

ZTE has replaced executives allegedly involved, including naming a new president.

Slideshow ( 5 images )

The company said on Wednesday it slid to a preliminary net loss of 2.36 billion yuan ($342 million) in 2016, its first loss in four years, due to the settlement.

But without the fine, it would have logged 3.8 billion yuan in profit, 18 percent higher than a year earlier. That was better than expected, as was a preliminary estimate for the first-quarter net profit rising between 21 and 31 percent, said Cindy Lam, an analyst with UOB Kay Hian in Hong Kong.

The settlement includes a $661 million penalty to Commerce; $430 million in combined criminal fines and forfeiture; and $101 million paid to the Treasury’s Office of Foreign Assets Control (OFAC). The action marks OFAC’s largest-ever settlement with a non-financial entity.

The Commerce Department will recommend ZTE be removed from a list of entities that U.S. firms cannot supply without a license if it lives up to its deal and a court approves its agreement with the Justice Department.

First placed on the list in March 2016, it has continued to do business with U.S. suppliers under a temporary general license that has been extended several times, with the latest reprieve expiring March 29.

The company’s guilty pleas, which must be approved by a judge, will take place in U.S. District Court in Texas.