WASHINGTON (Reuters) - US President Donald Trump's administration announced a major easing of its restrictions on US companies selling Chinese products to Huawei, saying the ban would apply only to products related to national security.

The move marks a major victory for technology companies that are struggling to continue selling their products to Huawei. This comes after the announcement of a truce in the trade war between Washington and Beijing last month by President Trump at the G20 summit.

Trade Minister Wilbur Ross said on Tuesday that his country would issue licenses to companies to sell their products to a Chinese communications equipment manufacturer under certain conditions.

"In line with the president's directives two weeks ago at the G20, the Department of Commerce will issue licenses in case there is no threat to national security," he said.

But Huawei will not be removed from the list of alleged entities, and companies will still need to apply for a license, he said.

"Within these limits, we will try to ensure that we are not only diverting revenue from the United States to foreign companies, Huawei remains on the list of prohibited entities," he said, noting that national companies may face refusal to accept licenses in some cases.

Under the terms of the ban, US companies must seek a license to sell anything manufactured in the United States or abroad that affects national security.

Trump announced a truce two weeks ago after a meeting with his Chinese counterpart Xi Jinping on the sidelines of the G20 summit in Osaka as part of the declaration. He said national companies would be allowed to sell to Hwawi, but did not say how that would happen.

Larry Cudlow, the president's economic adviser, said licensing requirements would be reduced, but only for a "limited period of time."

Many US chip makers will be able to continue selling to Huawei, and Google can now continue to work with the Chinese company to update Android on Huawei phones if it gets the license.

However, Ross or Kudlo did not say how long the ban would continue to relax, leaving open the possibility that the licenses would expire again if there was no progress in the trade talks.