President Trump suggested Friday that he might veto legislation designed to support anti-government protesters in Hong Kong — despite its near-unanimous support in the House and Senate — to pave the way for a trade deal with China.

Speaking on the “Fox & Friends” morning program, the president said that he was balancing competing priorities in the U.S.-China relationship.

“We have to stand with Hong Kong, but I’m also standing with President Xi [Jinping], he’s a friend of mine. He’s an incredible guy, but we have to stand … I’d like to see them work it out, okay?” the president said. “I stand with freedom, I stand with all of the things that I want to do, but we are also in the process of making one of the largest trade deals in history. And if we could do that, it would be great.”

The House on Wednesday passed the Hong Kong Human Rights and Democracy Act by a vote of 417 to 1. The lone holdout was Rep. Thomas Massie, a Republican from Kentucky. That came one day after the Senate had approved the measure on a unanimous vote.

The vetoproof majorities indicate that Congress could overrule the president if he tries to block the bill from becoming law.

“If he does veto this bill, sacrificing American values in the process, Congress should immediately and overwhelmingly override,” tweeted Scott Paul, the president of the Alliance for American Manufacturing, who has often backed Trump’s trade policies.

The legislation authorizes sanctions on Chinese and Hong Kong officials involved in human rights abuses and requires the State Department to conduct an annual review of the special autonomous status that the U.S. grants Hong Kong in trade matters.

The Hong Kong bill threatens to complicate trade negotiations that already are stalled on several key issues. Chinese officials have criticized the congressional action as unwanted interference in their country’s internal affairs.

Trump last month announced an “agreement in principle” with China on a partial trade deal, which he hoped to sign by mid-November. But talks have deadlocked over the details of Chinese purchases of U.S. farm products and plans for the removal of Trump’s tariffs on $360 billion in Chinese goods.

Trump’s comments Friday come one day after Sen. Marco Rubio (R-Fla.), one of the authors of the Hong Kong legislation, predicted on CNBC that the president would sign the measure.

“My understanding is that they will sign it,” Rubio said, referring to the White House.

A spokesman for the lawmaker, a prominent critic of the Chinese government, did not immediately respond to a request for comment.

The president also claimed, without evidence, that he had saved the lives of thousands of Hong Kong demonstrators by telling Xi not to intervene.

“The only reason he’s not going in is because I’m saying it’s going to affect our trade deal,” Trump said.