(Adds Google quote)

WASHINGTON, March 27 (Reuters) - U.S. President Donald Trump said he met with the chief executive of Alphabet Inc's Google on Wednesday and discussed "political fairness" and the company's business in China.

"He stated strongly that he is totally committed to the U.S. Military, not the Chinese Military," Trump said on Twitter of his meeting with Google CEO Sundar Pichai.

"Also discussed political fairness and various things that @Google can do for our Country. Meeting ended very well!," Trump said.

"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 U.S. government," a Google spokesperson said in a statement.

"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.”

The top U.S. general, Marine General Joseph Dunford, chairman of the Joint Chiefs of Staff, told a Senate committee hearing earlier this month that the Chinese military was benefiting from the work Google was doing in China.

Pichai has said Google has invested in China for years and plans to continue to do so.

In a tweet last week, Trump accused social media platforms Facebook, Google's YouTube and Twitter of favoring his Democratic opponents over him and his fellow Republicans and said he would look into the issue. (Reporting by Eric Beech and David Shepardson; editing by Mohammad Zargham and Phil Berlowitz)