LOS ANGELES-Google denied “working with the Chinese military” on Saturday after President Donald Trump publicly criticised the company in an evening message posted on Twitter. “Google is helping China and their military, but not the U.S.,” Trump said. “Terrible!”

“We are not working with the Chinese military. We are working with the U.S. government, including the Department of Defense, in many areas including cybersecurity, recruiting and healthcare,” a spokesperson said. Trump’s criticism came just days after Marine Gen. Joseph Dunford, chairman of the Joint Chiefs of Staff, made similar comments in testimony before Congress.

“The work that Google is doing in China is indirectly benefiting the Chinese military,” Dunford said during a Senate Armed Services Committee hearing.

“We watch with great concern when industry partners work in China knowing that there is that indirect benefit,” he said. “Frankly, ‘indirect’ may be not a full characterization of the way it really is, it is more of a direct benefit to the Chinese military.”

Google has faced external and internal criticism over the censored search engine it developed to comply with the country’s information restrictions, which is codenamed “Project Dragonfly.”

In December, CEO Sundar Pichai appeared before Congress, where he stated that there were no plans to launch the search engine “right now” but refused to rule it out in the future.

In June, the company said it would not renew a contract to help the U.S. military analyze aerial drone imagery when it expires, as the company sought to defuse internal uproar over the deal.