HONG KONG/NEW YORK -- U.S. President Donald Trump on Friday signaled he would not immediately sign the Hong Kong Human Rights and Democracy Act, citing a "very close" China trade deal, dashing the hopes of demonstrators that Washington could provide a check on Beijing's treatment of unrest in the city.

"We have to stand with Hong Kong, but I'm also standing with President Xi [Jinping]," Trump said in an interview with Fox News, referring to the Chinese leader as a friend of his.

"We have to see him work it out," Trump said. "I stand with Hong Kong, and I stand with freedom. I stand with all of the things we want to do, but we're also in the process of making the largest trade deal in history."

The U.S. president said he told Xi not to send troops into Hong Kong, as that would hinder prospects for a trade deal. "If it weren't for me, Hong Kong would have been obliterated in 14 minutes," he said.

"He sent a million soldiers standing outside of Hong Kong," Trump said of Xi. "They are not going in only because I ask him, 'Please don't do that, you'll be making a big mistake.' It's going to make a tremendous impact on the trade deal, and he wants to make a trade deal."

The Hong Kong act, sent to Trump's desk after passing both chambers of Congress this week, would impose sanctions on officials involved in suppressing basic freedoms in Hong Kong. It also mandates that Washington conduct annual reviews of the city's special trade status, which is essential to maintaining Hong Kong's standing as a financial hub.

China's foreign ministry has called on Trump to veto the legislation.

The U.S. president's remarks Friday show "the extent of Trump's efforts to maintain a positive relationship with President Xi Jinping and his prioritizing trade above all else," Eurasia Group analysts led by Michael Hirson wrote in a research note that day. This suggests the political risks around Hong Kong are more likely to delay a so-called phase 1 agreement than derail it, they said.

But even if the Hong Kong act becomes law, "its impact will remain largely symbolic," as results of such reviews will be advisory and not legally binding, said Andrew Coflan, another analyst at the political risk consulting firm.

"Revocation of Hong Kong's separate status could come either from the president, through an executive order, or from Congress, through revocation of or alterations to the 1992 Hong Kong Policy Act," Coflan wrote in a Friday research note. "However, the U.S. is unlikely to take such a step any time soon, as it would damage Hong Kong's economy, hurt the foreign business community, and potentially have financial ripple effects."

Meanwhile in Hong Kong, the controversial mask ban is back in force after judges who found the law unconstitutional on Monday agreed to leave it in effect until Nov. 29 while the government appeals their ruling.

The move to temporarily revive the law comes as politicians in Hong Kong entered the final days of campaigning for local elections scheduled for Sunday.

Clashes between protesters and police subsided during the week, with many who support the demonstrators calling for calm to avoid giving the government grounds to cancel or postpone the vote. Pro-government parties are expected to lose seats.

A small number of hardcore activists remain holed up at Hong Kong Polytechnic University, scene of some of the worst violence since protests began in June.

The dispute over the mask law goes to the heart of the issues that originally set off the protests -- the extent to which Hong Kong can keep its legal system independent of mainland intervention.

The city's status as a global financial and trading hub hinges on the perceived fairness of its courts. The protests started in opposition to a bill that would have allowed extradition of criminal suspects to the mainland.

Chinese officials and state media had rebuked the Hong Kong High Court as "nonsensical" for its ruling on Monday that the mask law, introduced through the administration's invocation of a century-old colonial regulation, was unconstitutional, arguing that the ruling would cause more violence.

The court found that the Basic Law -- the city's constitution -- grants only the legislature power to make law. But a spokesperson for the National People's Congress Standing Committee said on Tuesday that only his body had the authority to make judgments about constitutionality, ignoring that city courts had made similar rulings since China resumed control over Hong Kong in 1997.

Hong Kong's government has yet to appeal the High Court's finding, but the court said on Friday that officials had pledged "to pursue their intended appeal expeditiously."

Therefore, despite finding "no evidence ... [that violent acts] have increased or escalated since the handing down of the judgment" or that the anti-mask law had been effective before, the court said it would allow the law to temporarily stand "in view of the great public importance of the issues raised in this case, and the highly exceptional circumstances that Hong Kong is currently facing."

Tweeting in response to the court's announcement, activist Kong Tsung-gan said, "Wow: talk about letting yourself be bullied." Friday's ruling, he added, "Provides great legal clarity & shows judicial independence NOT."

Implicitly responding to critics of its Monday ruling, the judges said "nothing in our judgment condones the commission of crime or violence by any person with or without face covering ... or [supports] the illegitimate use of face covering for the purpose of concealing one's identity while committing unlawful or violent acts."

Between the anti-mask law's enactment on Oct. 4 and Nov. 14, 632 people were arrested for breaking the ban, though only 61 were charged in court. The High Court ruling came in response to a legal challenge to the mask law filed by 24 opposition legislators.