Google’s is “committed to the US Military, not the Chinese Military" President Trump said after meeting the firm's chief executive on Wednesday.
In a tweet, the President said he and Sundar Pichai also discussed “political fairness and various things that Google can do for our country”.
It follows a tweet earlier this year in which Mr Trump accused Google of "helping China".
Google told the BBC the company was “pleased” with the meeting.
"We were pleased to have productive conversations with the President about investing in the future of the American workforce, the growth of emerging technologies and our ongoing commitment to working with the US government,” the firm said.
The firm's spokesman would not, however, share details of how long the meeting was, or whether the firm agreed with Mr Trump’s characterisation of the discussion.
In two tweets, Mr Trump - incorrectly referring to Mr Pichai as Google’s “president” - said the “meeting ended very well!”.
“Just met with Sundar Pichai, President of Google, who is obviously doing quite well,” the tweet read.
“He stated strongly that he is totally committed to the US military, not the Chinese military.”
Mr Trump added: “Also discussed political fairness and various things that Google can do for our country.”
Republicans, including Mr Trump, have accused Google of unfairly “censoring” conservative views on its platform, an accusation the firm strongly denies, and one for which experts say there is no evidence. ‘Helping China' It had not been known that Mr Pichai would be meeting the president.
Mr Pichai was scheduled to be in Washington DC to speak to General Joseph Dunford, the chairman of the joint chiefs of staff. It was understood that Mr Pichai was there to discuss concerns about Google’s work in China.
The firm opened an artificial intelligence lab in Beijing in 2017. Earlier this month, Gen Dunford said the lab “indirectly benefits the Chinese military”.
It followed comments from Mr Trump that Google was “helping China”.
Mr Trump tweeted: "Google is helping China and their military, but not the US. Terrible! The good news is that they helped Crooked Hillary Clinton, and not Trump....and how did that turn out?"
While Mr Trump seems more satisfied with Google’s position now, the company faces internal unhappiness over its military ties. The firm was recently forced to back out of a contract with the Pentagon amid pressure from employees.