President Donald Trump on Tuesday threatened the motorcycle maker Harley-Davidson with "a big tax" after the company announced plans to move some of its manufacturing to Thailand.

He accused the company of using newly imposed tariffs as an excuse to leave the US.

But Harley-Davidson actually started its Thailand factory as a result of another Trump policy — his withdrawal from the Trans-Pacific Partnership.

President Donald Trump on Tuesday threatened the motorcycle maker Harley-Davidson with "a big tax" after the company announced plans to move some of its manufacturing to Thailand, and he also accused the company of using new trade tariffs as an excuse to leave the US.

"Early this year Harley-Davidson said they would move much of their plant operations in Kansas City to Thailand," Trump tweeted Tuesday. "That was long before Tariffs were announced. Hence, they were just using Tariffs/Trade War as an excuse."

Harley announced Monday that because of the European Union's new tariffs on US motorcycles — retaliation for Trump's steel and aluminum tariffs — the company would shift some production to plants outside the US.

Later that day, Trump said the company was waving the "white flag" and surrendering despite his having praised the company numerous times during his presidency and invited its executives to the White House.

"When I had Harley-Davidson officials over to the White House, I chided them about tariffs in other countries, like India, being too high," Trump continued on Twitter. "Companies are now coming back to America. Harley must know that they won't be able to sell back into U.S. without paying a big tax!"

The company says the EU's new tariffs will increase the cost of a motorcycle shipped to Europe from the US by $2,200 on average. To avoid this cost, the company plans to shift some production to countries that have lower or no tariffs from the EU. Harley maintains facilities in Australia, Brazil, India, and Thailand.

At the same time, the company would most likely continue selling bikes made in the US, where it has its headquarters, to Americans. Trump again mentioned a tax increase of some kind, however, in a tweet later Tuesday morning.

"A Harley-Davidson should never be built in another country-never!" Trump said. "Their employees and customers are already very angry at them. If they move, watch, it will be the beginning of the end - they surrendered, they quit! The Aura will be gone and they will be taxed like never before!"

Economists said Harley's decision to shift production outside the US was a predictable result of Trump's increased trade restrictions and was most likely a sign of things to come.

But Trump may be mistaken about the company's Thailand plant. Harley said it decided to build the Thailand plant after Trump pulled out from the Trans-Pacific Partnership, a trade deal that would have lowered import tariffs on its bikes in some of the fastest-growing motorcycle markets in Asia.

Trump remained focused on the most recent round of tariffs, insisting that Europe had "long taken advantage of" the US and suggesting the tariffs would eventually benefit US manufacturers.

"In the end it will all even out," he said. "And it won't take very long!"

Bob Bryan and Reuters contributed to this report.