Open this photo in gallery:

Supporters of TikTok gather near the Capitol in Washington, March 13. TikTok asked the Supreme Court on Dec 16, to temporarily block a law that would effectively ban it in the United States in a matter of weeks. The company and its Chinese parent invoked the First Amendment in urging the justices to step in before a Jan. 19 deadline to sell or be shut down.KENT NISHIMURA/The New York Times News Service

U.S. president-elect Donald Trump indicated on Sunday that he favoured allowing TikTok to keep operating in the United States for at least a little while, saying he had received billions of views on the social media platform during his presidential campaign.

Mr. Trump’s comments before a crowd of conservative supporters in Phoenix, Ariz., were one of the strongest signals yet that he opposes a potential exit of TikTok from the U.S. market.

The U.S. Senate passed a law in April requiring TikTok’s Chinese parent company, ByteDance, to divest the app, citing national security concerns.

TikTok’s owners have sought to have the law struck down, and the U.S. Supreme Court has agreed to hear the case. But if the court does not rule in ByteDance’s favour and no divestment occurs, the app could be effectively banned in the United States on Jan. 19, one day before Mr. Trump takes office.

It is unclear how Mr. Trump would go about undoing the TikTok divestiture order, which passed overwhelmingly in the Senate.

“I think we’re going to have to start thinking because, you know, we did go on TikTok, and we had a great response with billions of views, billions and billions of views,” Mr. Trump told the crowd at AmericaFest, an annual gathering organized by conservative group Turning Point.

“They brought me a chart, and it was a record, and it was so beautiful to see, and as I looked at it, I said, ‘Maybe we gotta keep this sucker around for a little while,’” he said.

Mr. Trump met with TikTok’s CEO on Monday. Mr. Trump said at a news conference the same day that he had a “warm spot” for TikTok thanks to his campaign’s success on the app.

The Justice Department has argued that Chinese control of TikTok poses a continuing threat to national security, a position supported by most U.S. lawmakers.

TikTok says the Justice Department has misstated the social media app’s ties to China, arguing that its content recommendation engine and user data are stored in the United States on cloud servers operated by Oracle Corp., while content moderation decisions that affect U.S. users are made in the United States.