Silicon Valley venture capitalist Peter Thiel was right to call out Alphabet's Google for working with China, former Barack Obama White House cybersecurity chief Richard Clarke told CNBC on Wednesday.

"Here's what I think is true: Google refused to work for the Pentagon on artificial intelligence," said Richard Clarke, whose 30-year government career also included stints as White House counterterrorism coordinator under former presidents Bill Clinton and George W. Bush. Clarke was referencing Google's contract with the Defense Department, which expired earlier this year and was not renewed.

"If you turn around and you work on artificial intelligence in China, and you don't really know what they're going to do with that, I think there's an issue," Clarke said in a "Squawk Box" interview.

In 2017, Google opened an AI center in Shanghai to focus on education and machine language learning. However, the search engine is still blocked in the country.

Clarke was responding to Thiel's weekend accusations that Google works with the Chinese military and Thiel's calls for the FBI and CIA to investigate.

In response, President Donald Trump tweeted Tuesday that his administration will "take a look" into Google. Thiel was a supporter of Trump's 2016 presidential campaign.

TWEET

Google has denied working with the Chinese military.

When asked by CNBC's Andrew Ross Sorkin if Clarke had evidence of Google working with China, the cybersecurity expert said Wednesday that the U.S. tech giant is working on AI projects there. "Do you think there's a real distinction" between Chinese companies and the Chinese government, he asked, rhetorically.