President Donald Trump, in a tweet on Monday, said Pfizer and other drugmakers "should be ashamed" for increasing drug prices.

Pharmaceutical companies increased the prices of 104 drugs last week. Pfizer raised the price of 41 drugs by as much as 9 percent, though it also lowered prices on five drugs by as much as 44 percent. The increases came despite Trump's promise in May that companies would announce "massive, voluntary price cuts" in two weeks.

Pfizer responded to Trump's tweet by saying that the list price of the majority of its drugs are unchanged.

"Our portfolio includes more than 400 medicines and vaccines; we are modifying prices for approximately 10 percent of these, including some instances where we’re decreasing the price," Pfizer said in a statement. "Importantly, list prices do not reflect what most patients or insurance companies pay. In the first quarter of 2018 the net selling price increase was 0 percent due to the growing amount of rebates paid back to stakeholders in the biopharmaceutical supply chain.”

Trump on Monday said the companies "are merely taking advantage of the poor (and) others unable to defend themselves, while at the same time giving bargain basement prices to other countries in Europe (and) elsewhere." He said "we will respond" but did not say how.

Trump tweet

Shares of Pfizer briefly turned negative on the tweet but ended the day up less than 1 percent.

Trump has repeatedly criticized pharmaceutical companies, even accusing them of "getting away with murder." His administration unveiled a plan in May to lower prices for consumers.

"[Pharmaceutical companies] are among the most profitable in the U.S. but something has got to give," David Maris, Wells Fargo equity research analyst, said on "Power Lunch" on Tuesday. "And consumers can't give anymore. Now it's time for the industry to figure out a way to either pay lower discounts and rebates and get those savings to consumers, but somehow the consumer has to get some relief. I think that's what generated the president's tweet today."

— CNBC's Meg Tirrell and Amelia Lucas contributed to this report.