The companies that are the biggest exporters of generics to the United States take the same position. “Although we have been expanding our exports to the U.S., we are not raising costs as much, which helps the Americans to be able to afford the same medicines at a cheaper rate,” said Snehashish Sen, the manager of costing at Cipla Ltd., one of the largest Indian manufacturers of generic drugs. “I do not see how we are hurting the sector. In fact, by making medicines more affordable, we are helping Americans.”

In a quick analysis of trade data for four common families of pharmaceuticals, Panjiva found that American imports of statins, anticonvulsants and insulins had doubled, while imports of proton-pump inhibitors had risen sixfold over the past five years. The imports consisted heavily of generic drugs, and three-fifths came from India, although Eastern Europe has become an increasingly important supplier as Israeli and Swiss companies set up factories there.

The three leaders in shipping pharmaceuticals in those four categories to the United States are Indian makers of generic drugs: Dr. Reddy’s Laboratories and Aurobindo Pharma Ltd., both in Hyderabad, and Cipla, in Mumbai.

Mr. Trump’s remarks came as pharmaceutical officials and experts outside of the United States were already concerned that global demand might be stagnating for a wide range of their products amid broader economic softness and a slowdown in trade. China’s total exports of health products, from crutches to drugs, fell 2 percent in the first three quarters of last year compared with the same period a year earlier — the first drop in decades.

“The new president of the United States, and Britain leaving the European Union, both indicate the ebb of economic globalization,” said Lin Jianning, the dean of the China Food and Drug Administration’s economic research institute, in a speech on Nov. 23. “In the long run, it won’t bring benefit to the medicine industry.”

The production of pharmaceuticals and other health care products is increasingly global. The main category in United States customs data for pharmaceutical imports — a category that encompasses bandages and most but not all drugs — has surged nearly 50 percent in the past five years, and it is now running at nearly $100 billion a year.

One of the more politically delicate questions lies in where the ingredients used to make drugs come from. Many pharmaceutical companies import chemical compounds but finish production, like turning the compounds into pills and packaging them for sale, in the United States. The imports have raised questions about the loss of American jobs, which Mr. Trump may have been alluding to on Wednesday, and also about quality control.