President Donald Trump said Thursday that he called Apple CEO Tim Cook to thank him for announcing hundreds of billions of dollars in U.S. investments following passage of Republican tax legislation last year.

Apple said Wednesday it would return hundreds of billions of dollars to the U.S. from overseas, pay a $38 billion tax bill on that money and invest about $350 billion in its domestic operations over the next five years. The company plans capital expenditures of about $30 billion and will create about 20,000 new jobs at existing sites and a new campus.

"When I heard the news yesterday - and Tim Cook is a great guy, the head of Apple - when I heard the news, I heard $350 billion and I said, 'You mean $350 million, that is going to be a beautiful plant,' and they said 'no,' they said 'it is $350 billion,' " Trump said in a speech at a factory in Coraopolis, Pa., a Pittsburgh suburb. "I just called Tim Cook and thanked him, but I don't imagine there has ever been an investment that big in our country by a company."

Cook and Trump have not been close. While the Apple chief has spread his political donations across both major U.S. parties, according to Federal Election Commission, he held a fundraiser in 2016 for Hilary Clinton and last year pledged $2 million to anti-hate groups after a deadly rally by white supremacists in Charlottesville, Va. Cook criticized Trump for blaming "both sides" for violence at the rally.