SAN FRANCISCO — Shares of U.S. supermarket operators fell on Friday as President Donald Trump kept up his criticism of Mexico, which is a major supplier of produce and other foods for U.S. consumers.

A day after the White House suggested that the United States could impose a 20 percent tax on goods from Mexico, shares of Wal-Mart Stores and Kroger Co fell more than 1 percent, while Whole Foods Market dropped 2.8 percent.

Trump on Friday repeated statements that Mexico, a major exporter of vegetables, fruits and beer, has taken advantage of the United States. Mexico, he said, “beat us to a pulp,” deepening worries about a crisis between the two trading partners.

On Thursday, Mexican President Enrique Pena Nieto scrapped a planned trip to Washington to meet Trump, who has repeatedly demanded that Mexico pay for a wall on the U.S. border to halt illegal immigration. The White House later said the potential 20 percent tax could be used to pay for the wall.

Mexico was the second-largest supplier of agricultural exports to the United States in 2015, according to the Office of the United States Trade Representative, or USTR.

Mexican agricultural exports to the United States in 2015 totaled about $21.6 billion, up 191 percent from 1993, before the two countries and Canada cemented the North American Free Trade Agreement, according to the USTR.

Less than 1 percent of Hass avocados — the main ingredient in guacamole — sold in the United States so far in 2017 were domestically grown, with 93 percent arriving from Mexico, according to the Hass Avocado Board.

The United States consumes nearly all of its own tomatoes, exporting just 6 percent, according to the U.S. Department of Agriculture. Of the tomatoes the United States imports, Mexico accounts for 71 percent, with Canada supplying most of the rest.

A new tax on food imported from Mexico would leave supermarkets with the difficult choices of raising prices, sacrificing already low profitability, or a mixture of the two.

U.S. grocers deal with a higher-than-average cost of goods sold than most other industries, resulting in razor-thin margins. Through 2015, the six-year average cost of goods sold as a percentage of revenue for U.S. grocers was 73.4 percent versus around 56 percent for all U.S. industries, according to Plunkett Research.

Shares Kroger and Wal-Mart are down about 3 percent from before Trump’s inauguration a week ago while food distributor Sysco has lost about 1.5 percent.