The US president and top defence officials have alleged that the Chinese military benefits from the work that Google is doing in China. Last year, Trump unleashed a large-scale trade war against Beijing, partly due to the alleged theft of US intellectual property.

Google has pushed back accusations of helping Chinese military brought forward by Donald Trump.

"We are not working with the Chinese military. We are working with the U.S. government, including the Department of Defence, in many areas including cybersecurity, recruiting and healthcare," a spokesperson for the company said as quoted by the Wall Street Journal reporter Vivian Salama.

This comment came after Donald Trump accused the tech giant of benefiting China instead of the United States. "Google is helping China and their military, but not the US," he tweeted on Saturday. "Terrible! The good news is that they helped Crooked Hillary Clinton, and not Trump…."

In testimony to Congress on Wednesday, US Joint Chiefs of Staff Chairman Gen. Joseph Dunford stated that Google's operations in China are "indirectly helping advance the Chinese military".

"We watch with great concern when industry partners work in China, knowing that there is that indirect benefit and frankly indirect may be not a full characterisation of the way it really is, it's more of a direct benefit to the Chinese military," he added.

Another top military official, Acting Defence Secretary Patrick Shanahan, claimed

that the alleged theft of US technology by Chinese entities is boosting Beijing's technological advancements in the military sector.

The United States has repeatedly claimed that Chinese companies steal American intellectual property and conduct economic espionage, and that what they collect is being transferred to the defence sector.

Last year, Donald Trump cited China's presumed intellectual property theft as being among the reasons for imposing import tariffs worth hundreds of billions of US dollars. Chinese authorities, who retaliated with their own trade tariffs, have repeatedly denied that they order their companies to spy in the US and elsewhere.

Washington has also launched a crusade against Chinese tech giants Huawei and ZTE, claiming that their technology poses a security risk to the emerging 5G infrastructure.

READ MORE: Former Trump Adviser Sees No Prospects for Long-Term US-China Trade Deal

Trump has banned their products from use by US government agencies; several allies, including Australia, Japan, Israel, the Czech Republic, and New Zealand have followed suit.

US envoy to Germany Richard Grenell has threatened to scale down intelligence-sharing cooperation with Germany if it allowed Huawei to participate in the country's 5G build-up. Berlin, however, opted not to bow down to the pressure.