Producers of metals, grains and other raw materials rose as inflation fears percolated.

The U.S. dollar was more or less flat against rivals. Upward moves in the dollar put downward pressure on precious metals and other dollar-denominated commodities.

While an artificial-intelligence boom has sustained economic expansion in the U.S., the closure of the Strait of Hormuz and a spike in energy costs appears to be slowing demand for industrial materials in the rest of the world. For example, the S&P purchasing managers index for the eurozone fell to 47.5 in May from 48.8 in April.

Heavy rainfall in parched crop-growing areas like Kansas, Oklahoma, and Texas weighed on grain prices.

Write to Rob Curran at rob.curran@dowjones.com