WASHINGTON — President Trump said the United States and China were moving closer toward a trade agreement and suggested that the fate of Huawei, the Chinese telecom giant facing criminal charges along with its chief financial officer, could be resolved as part of a final trade deal with Beijing.

Ringed by his top advisers and a visiting Chinese delegation on Friday in the Oval Office, Mr. Trump said talks would continue through the weekend and that there was a “very, very good chance” of a deal with China being reached. He said he expected to meet personally with President Xi Jinping of China to “work out the final points,” most likely in March at Mar-a-Lago, the president’s resort in Palm Beach, Fla.

The talks have been aimed at resolving the Trump administration’s concerns about China’s trade barriers and its treatment of American companies, including forcing firms to hand over valuable technology as a condition of doing business there. But Mr. Trump again indicated that he might intertwine a national security case with the trade talks, despite concerns from his own law enforcement and intelligence officials about doing so.

Asked by a reporter if criminal charges against Huawei — which has been accused by the Justice Department of stealing trade secrets — could be dropped as part of the trade pact, the president said: “We’ll be talking to the U.S. attorneys and the attorney general. We’ll be making that decision.”