In the early hours of Thursday morning, the U.S. government reached a deal with Chinese tech giant ZTE to lift a ban preventing it from buying parts from U.S. firms in return for paying a fine of $1 billion.

However, within minutes of the deal being announced, Republican Sen. John Kennedy was blasting the agreement, claiming that it amounts to doing a deal with the Communist Party.

“It's not the money; it’s the fact that ZTE helped Kim Jong Un and lied about it,” the Louisiana senator told CNN. “Some would argue they are a state-controlled company, and that means they are pretty close to the Communist party of China.”

Kennedy was referencing ZTE’s violation of sanctions by selling technology to North Korea and Iran, which ultimately led to the Commerce Department imposing the ban in April.

Kennedy added that he “wouldn't buy a ZTE phone and allow my information to be shared by President Xi Jinping and the Communist Party.”

When asked why the administration would do a favorable deal with a company suspected of spying for the Chinese government, Kennedy said the deal was “a bargaining chip” in a larger “chess game” Donald Trump is playing with Xi while trying to negotiate a larger trade deal with China.

Kennedy has previously said he is “100 percent behind” Trump and thinks the president is “doing a great job,” though he doesn’t necessarily agree with all of his policies.

Commerce Secretary Wilbur Ross had announced earlier Thursday that a deal had been struck.

“At about 6 a.m. this morning, we executed a definitive agreement with ZTE and that brings to a conclusion this phase of the development with them,” Ross said in an interview with CNBC.

As well as the mammoth fine, ZTE will have to change its board and management within 30 days and put $400 million in escrow, while a U.S.-led compliance team will be added to the company, Ross said.

“We are literally embedding a compliance department of our choosing into the company to monitor it going forward. They will pay for those people, but the people will report to the new chairman,” Ross said.

ZTE has already paid almost $1.2 billion in fines for violating U.S. trade agreements but the Commerce Department then alleged ZTE had misled regulators and failed to discipline the employees responsible for the sanction breach — leading to the ban.

Last month Trump had indicated he would consider easing the ban on ZTE, and within 24 hours the Chinese company had struck a deal with lobbying and public relations powerhouse Mercury Public Affairs.

One of the consultants working on the account was Bryan Lanza, a veteran of the Trump 2016 presidential campaign. Within two weeks of Lanza starting work on the account, the White House announced a tentative deal with ZTE.