U.S. President Donald Trump said on Tuesday he would intervene with the U.S. Justice Department in the case against a Chinese telecommunications executive if it would help secure a trade deal with Beijing.

"If I think it's good for the country, if I think it's good for what will be certainly the largest trade deal ever made — which is a very important thing — what's good for national security — I would certainly intervene if I thought it was necessary," Trump said in a wide-ranging interview with Reuters in the Oval Office.

Trump expressed optimism that he could strike a trade deal with Chinese President Xi Jinping as the two countries struggle to resolve a dispute that has contributed to recent U.S. stock market declines and raised questions about whether economic turmoil could beset the president in the new year.

At the request of U.S. authorities, Huawei Technologies executive Meng Wanzhou was arrested earlier this month in Vancouver on charges of violating U.S. sanctions against Iran.

The arrest came the same day Trump and Xi declared a 90-day truce in their trade war during summit talks in Buenos Aires.

Trump, who wants China to open up its markets to more American-made products and stop what Washington calls the theft of intellectual property, said he had not yet spoken to Xi about the case against Huawei's executive.

In the wake of his meeting with Xi in Buenos Aires, Trump said during the interview that trade talks with Beijing were under way by telephone, with more meetings likely among U.S. and Chinese officials.

He said the Chinese government was once again buying large quantities of U.S. soybeans, a reversal after China in July imposed tariffs on U.S. supplies of the oilseed in retaliation for U.S. duties on Chinese goods.

"I just heard today that they're buying tremendous amounts of soybeans. They are starting, just starting now," Trump said.

Commodity traders in Chicago, however, said they have seen no evidence of a resumption of soybean purchases by China, which last year bought about 60 percent of U.S. soybean exports in deals valued at more than $12 billion.

Already fraught, relations between the United States and China have been further complicated by the arrest of Meng, 46.

She faces U.S. accusations she misled multinational banks about Huawei's control of a company operating in Iran, putting the banks at risk of violating U.S. sanctions and incurring severe penalties, court documents said.

If extradited to the United States, Meng would face charges of conspiracy to defraud multiple financial institutions. A Canadian court on Tuesday granted Meng bail while she awaits an extradition hearing Trump has intervened on behalf of a Chinese company before.

Earlier this year he revisited penalties for Chinese company ZTE for lying to the U.S. after the company pleaded guilty to violating U.S. sanctions on trade with Iran, saying the telecom maker is a big buyer for U.S. suppliers.

Trump said Meng could potentially be released.

"Well, it's possible that a lot of different things could happen. It's also possible it will be a part of negotiations. But we'll speak to the Justice Department, we'll speak to them, we'll get a lot of people involved," he said.

Asked if he would like to see Meng extradited to the United States, Trump said he wanted to first see what the Chinese request. He added, however, that Huawei's alleged practices are troubling.

"This has been a big problem that we've had in so many different ways with so many companies from China and from other places," he said.

— CNBC contributed to this report.