UPS told CNBC in a statement that it "follows all applicable laws and administrative orders of the governments in the countries where we do business. We work closely with regulatory authorities to monitor for prohibited substances."

It is unclear whether Trump's statements will be followed up with official guidelines from federal agencies.

"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!)," Trump said.

In a series of tweets in which he called on American companies to look for "an alternative to China" on Friday, Trump singled out FedEx , UPS , Amazon and the United States Postal Service specifically. China is the largest source of fentanyl to the U.S., according to a 2017 report by the U.S.-China Economic and Security Review Commission.

President Donald Trump called on major package carriers in the United States to "search for & refuse" packages from China that contain the drug fentanyl.

FedEx said in a statement that it "already has extensive security measures in place to prevent the use of our networks for illegal purposes. We follow the laws and regulations everywhere we do business and have a long history of close cooperation with authorities."

"FedEx supported passage of the STOP Act and encourages accelerated implementation and enforcement of its provisions to protect the health and safety of the American people," the company continued, referring to legislation signed by Trump last October.

Amazon and the Postal Service were not immediately available for comment.

Fentanyl is a synthetic opioid that can be 100 times more powerful than morphine. The Department of Homeland Security was considering labeling fentanyl as a weapon of mass destruction earlier this year. Just $5,000 can buy enough fentanyl on the Chinese market to provide lethal doses to half a million people. The Centers for Disease Control and Prevention estimated there were around 48,000 overdose deaths in 2017 involving all opioids.

Shares of FedEx, UPS and Amazon all fell by more than 3%. The broader market dropped as well, with the Dow Jones Industrial Average shedding more than 600 points or about 2.4%.

This isn't the first time carriers have been caught up in the middle of a trade dispute. FedEx is facing scrutiny from the Chinese government for mishandling packages containing products made by Huawei, a Chinese technology company that Trump has called a "national security threat." FedEx said the shipment issues were operational errors.

FedEx also sued the Department of Commerce in June over the department's regulations on exports, saying they created an "impossible burden" for the company.

The Trump administration has prioritized cracking down on Chinese exports of fentanyl and its precursor chemicals. Last year, Trump asked China to seek the death penalty for distributors of fentanyl and said that he had reached an agreement with President Xi Jinping to take measures against the drug that were "very exciting." Earlier this year, China had announced that it would expand control of fentanyl-related substances by adding it to the supplementary list of controlled narcotic drugs.

In Trump's series of tweets, he also said he was "ordering" American companies to find alternatives to their operations in China immediately and start making products in the U.S.