A U.S. district court judge Tuesday agreed to end ZTE’s five-year probation following the Chinese telecommunications company’s 2017 guilty plea for violating Iran sanctions.

Judge Ed Kinkeade of the U.S. District Court for the Northern District of Texas ended ZTE’s probation, despite his opinion the company participated in conspiracy to commit visa fraud as part of a separate, ongoing case brought by the Department of Justice last year. While ZTE has not been charged in the visa case, Judge Kinkeade held a hearing to determine whether the allegation constituted a violation of ZTE’s probation.

Ultimately, the judge ruled ZTE already reached its maximum five-year term of probation and had paid the maximum statutory penalty.

Red flags raised: Judge Kinkeade had strong words of criticism regarding the company’s compliance program. Calling ZTE “not completely trustworthy,” he said the company’s “record of compliance can be summarized in one word: ’sometimes.’”

The judge further defended the work of the court-appointed compliance monitor while criticizing ZTE’s lack of cooperation. He noted the company was caught not abiding by the plea agreement—specifically not firing the board, chief executive officer, and other senior leaders and not denying them bonuses—which resulted in the U.S. government suspending the company from doing business.

“The monitor’s duties could have been concluded two years ago, but in 2018 the government and defendant reached an agreement for the probation to continue,” Judge Kinkeade wrote.

While ZTE fired all its senior executives in 2018 and is under new management, it did not take this measure “until the monitor identified the failure” that led to ZTE’s first probation violation in 2018.

“The company only cleaned up its act after getting caught … again,” Judge Kinkeade said.

The judge in his ruling encouraged the government “to pursue any reasonable charges and criminal or civil penalties in all cases known and currently unknown,” especially “the three other matters raised by the monitor: failure to implement compliance programs at all its affiliates; (failure) to correct inappropriate exports of controlled items; and untested or flawed compliance regulating computer systems.”

Following the ruling, ZTE said in a statement it is “committed to building a world-class compliance enterprise, making compliance the cornerstone of its strategic development and the bottom line of operations, complying with the applicable laws and regulations of the countries in which it operates, and building a comprehensive compliance system.” The company added it “has full confidence in the effective operation and continuous improvement of the compliance management system.”

In 2017, ZTE was hit with penalties totaling $1.19 billion for violating sanctions laws by sending U.S.-origin items to Iran. The plea agreement required ZTE to submit to a three-year period of corporate probation, during which time an independent corporate compliance monitor would review and report on ZTE’s export compliance program.

ZTE in 2018 reached an agreement with the Commerce Department after being accused of violating the terms of the 2017 settlement. The new agreement included an additional $1 billion penalty and further compliance requirements, including the retention of a team of special compliance coordinators, selected by and answerable to the Bureau of Industry and Security, for a period of 10 years. The monitorship is ongoing.