Chinese telecom equipment maker ZTE will plead guilty and pay $892 million to settle allegations it violated U.S. laws that restrict the sale of American-made technology to Iran and North Korea, the company and U.S. government agencies said Tuesday.

ZTE entered into an agreement to plead guilty to conspiring to violate the International Emergency Economic Powers Act, obstruction of justice and making a material false statement, the Justice Department said.

The settlement was made with Justice, the Commerce Department and the Treasury Department.

The Commerce Department investigation 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 telecommunications carrier.

“ZTE acknowledges the mistakes it made, takes responsibility for them, and remains committed to positive change in the company,” Zhao Xianming, ZTE’s chairman and chief executive, said Tuesday in a statement.

Between January 2010 and January 2016, ZTE directly or indirectly shipped U.S.-origin items worth approximately $32 million to Iran without obtaining the proper export licenses from the U.S. government. ZTE then lied to federal investigators, insisting that the shipments had stopped, the Justice Department said.

The company also took actions involving 283 shipments of controlled items to North Korea, authorities said.

“Those who flout our economic sanctions and export control laws will not go unpunished,” Commerce Secretary Wilbur Ross said in a statement. “They will suffer the harshest of consequences.”

Shipped items included routers, microprocessors and servers controlled under export regulations for security, encryption and anti-terrorism reasons.

The agreement caps a year of uncertainty for the Shenzhen-based company, which in March 2016 was placed on a list of entities with which U.S. suppliers could not work without a license. ZTE acted contrary to U.S. national security or foreign policy interests, the Commerce Department said at the time.

A court still needs to approve ZTE’s agreement with the Justice Department, after which the Commerce Department could recommend that the company be removed from that list.

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

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

One of the world’s biggest makers of telecommunications gear and the No. 4 smartphone vendor in the United States, ZTE sells handset devices to U.S. mobile carriers AT&T, T-Mobile and Sprint. It relies on U.S. companies including Qualcomm, Microsoft and Intel for components.