President Trump on Friday “ordered” US companies to find “an alternative to China” for doing business after the country slapped more retaliatory tariffs on US imports, sending the stock market into a tailspin.

“Our Country has lost, stupidly, Trillions of Dollars with China over many years. They have stolen our Intellectual Property at a rate of Hundreds of Billions of Dollars a year, & they want to continue. I won’t let that happen! We don’t need China and, frankly, would be far better off without them,” he wrote in a tweetstorm.

“The vast amounts of money made and stolen by China from the United States, year after year, for decades, will and must STOP. Our great American companies are hereby ordered to immediately start looking for an alternative to China, including bringing your companies HOME and making your products in the USA.”

China had said earlier that it would impose new tariffs on $75 billion in US goods in retaliation for Trump’s latest tariff hikes. The announcement sent the Dow into a nosedive that saw it finish 623 points down for the day.

The government said that it would increase import duties on US-made autos and auto parts, and that tariffs of 10 percent and 5 percent would take effect on separate batches of US goods on Sept. 1 and Dec. 15.

Beijing gave no details of what goods would be affected but the timing matches Trump’s planned hikes on $300 billion in Chinese goods, which he announced earlier this summer.

Hours later, before his flight to France for the G-7 summit Friday night, the president struck back, declaring that he would increase existing and future levies on Chinese goods and move the start date on those he’d postponed back to Sept. 1.

“Starting on October 1st, the 250 BILLION DOLLARS of goods and products from China, currently being taxed at 25%, will be taxed at 30%” he tweeted, along with other posts bashing China.

“Additionally, the remaining 300 BILLION DOLLARS of goods and products from China, that was being taxed from September 1st at 10%, will now be taxed at 15%. Thank you for your attention to this matter!”

Tariffs on the $300 billion worth of imports were originally all going to be imposed at the start of September — but Trump later pushed back the launch date for many consumer products until Dec. 15. as trade talks continued with China.

Bill Reinsch, a senior Commerce Department official in the Clinton administration, said Trump had limited options to force American companies to quit China, and that it would make little economic sense even if companies followed his advice, which he said was unlikely.

The order would hit companies like Boeing, Apple and General Motors, which are both big US contractors and have large business interests in China.

“We can’t be a market economy and do that,” Reinsch said. “No one’s going to pay attention to it anyway. Companies do what they’re going to do.”

The commander in chief also railed about fentanyl in his Twitter diatribe, and challenged delivery companies to refuse to deliver packages of fentanyl to US addresses.

We don’t need China and, frankly, would be far better off without them - Donald Trump

“I am ordering all carriers, including Fed Ex, Amazon, UPS and the Post Office, to SEARCH FOR & REFUSE all deliveries of Fentanyl from China (or anywhere else!). Fentanyl kills 100,000 Americans a year. President Xi said this would stop – it didn’t,” he tweeted.

“This is more important than anything else that we’re working on, just about,” he told reporters Friday night on the South Lawn, as he prepared to fly to the G-7.

Trump has no legal authority to force US companies to abandon China, and it was unclear what delivery companies could do to weed out packages containing fentanyl.

David French, senior veep at the National Retail Federation, the nation’s largest retail trade group, said that it would be “unrealistic” to expect US companies to leave China.

But more than 50 multinational corporations had already announced plans to move manufacturing out of China, or are thinking about it, The Washington Post reported last month.

Google, Nintendo and Dell, among others, wanted to duck the import penalties.

But rather than move their operations to the States, many want to rebuild their supply chains elsewhere, primarily in Southeast Asia.

Trump on Friday also raged at Fed Chair Jerome Powell, whom he appointed, for a speech in which he offered few clues about whether the Fed would cut interest rates, as Trump has demanded.

“Business investment and manufacturing have weakened, but solid job growth and rising wages have been driving robust consumption and supporting moderate overall growth,” Powell said in Jackson Hole, Wyoming — but his failure to address rate cuts triggered the president.

“As usual, the Fed did NOTHING! It is incredible that they can ‘speak’ without knowing or asking what I am doing, which will be announced shortly. We have a very strong dollar and a very weak Fed,” he wrote.

“My only question is, who is our bigger enemy, Jay Powell or Chairman Xi?”

The president, who had tweeted that “Trade wars are good, and easy to win” in March 2018 when he first imposed levies on steel and aluminum, has more recently blamed Powell for not cutting rates, and Democrats and the media for reporting signs of a possible recession as the 2020 elections near.

“The Economy is strong and good, whereas the rest of the world is not doing so well. Despite this the Fake News Media, together with their Partner, the Democrat Party, are working overtime to convince people that we are in, or will soon be going into, a Recession,” he tweeted Friday before China’s tariffs were announced.

With Post wires