The major domestic equity indexes lost ground on Thursday after the United States moved to impose tariffs on metal imports from Canada, Mexico and the European Union, prompting retaliatory measures from some of its trading partners.

For the month, however, the S&P 500 index, Dow Jones Industrial Average and the Nasdaq composite had their largest percentage gains since January. The small-cap Russell 2000, whose constituents tend to be domestically focused, had its largest monthly percentage gain since September.

On Thursday, Commerce Secretary Wilbur Ross said a 25 percent tariff on steel imports and a 10 percent levy on aluminum imports from its allies would go into effect on Friday.

Mexico responded by imposing measures on U.S. farm and industrial products, targeting pork legs, apples, grapes and cheeses, as well as steel.

Canada said it would impose retaliatory tariffs on $12.8 billion worth of U.S. exports and challenge the steel and aluminum tariffs under the North American Free Trade Agreement and the World Trade Organization.

The S&P 500 Packaged Foods and Meats index fell 2.0 percent, with all its 11 components in the red. Tyson Foods and Kraft Heinz were the largest drags on the index.

Friction between the United States and its trading partners has roiled financial markets since March, when Trump decided to impose the metal tariffs. Trade issues overshadowed economic data showing accelerated growth in consumer spending.

For the month, the S&P rose 2.16 percent, the Dow added 1.05 percent, and the Nasdaq gained 5.32 percent.

The S&P Composite 1500 Steel index gave up earlier gains after Mexico’s retaliation, though several of its components, including Nucor and United States Steel advanced. The steel index ended the day down 0.1 percent.

Shares of Boeing and Caterpillar were down 1.7 percent and 2.3 percent, respectively.

Adding to the trade worries was a report that the United States aimed to target German carmakers, having launched a probe last week into car and truck imports.

Utilities, seen as a defensive sector, were the largest gainers among the S&P 500’s major sector indexes, rising 0.1 percent.

General Motors led the S&P 500 in percentage gains, rising 12.9 percent after Japan’s SoftBank Group said it would invest $2.25 billion in GM’s autonomous vehicle unit.

Dollar General was down 9.4 percent and Dollar Tree lost 14.3 percent after both discount retailers missed Street estimates for their quarterly same-store sales.

Approximately 8.09 billion shares changed hands on the major domestic equity exchanges, as compared to the 6.63 billion share average over the past 20 trading days.

Pickup in Consumer Spending

Consumer spending exceeded expectations in April, continuing the hypothesis that economic growth was regaining momentum early in the second quarter, while inflation continued to rise steadily.

The Commerce Department reported on Thursday morning that consumer spending, which accounts for more than two-thirds of GDP, rose by 0.6 percent last month, making it the largest gain in five months. The increase came on the heels of a 0.5 percent increase during last March.

Spending was aided by purchases of gasoline and other energy products. Sales of nondurable goods increased 0.9 percent. In addition, there were increases in purchases of long-lasting goods. Outlays on services rose 0.5 percent, lifted by demand for household utilities.

Prices continued to rise last month. The personal consumption expenditures (PCE) price index excluding the volatile food and energy components increased 0.2 percent for the third straight month.

That left the year-on-year increase in the so-called core PCE price index at 1.8 percent. The core PCE index is the Fed’s preferred inflation measure. The Fed has a 2 percent inflation target.

It is possible that the annual core PCE price index will breach the Fed’s target in the coming months. The Fed raised rates in March and has forecast at least two more rate hikes for this year.

The moderate increase in inflation helped support consumer spending last month. When adjusted for inflation, consumer spending rose 0.4 percent in April after increasing 0.5 percent in the prior month. That suggests an acceleration in consumer spending after it grew at a 1.0 percent annualized rate in the first quarter, the slowest pace in nearly five years.

The solid consumer spending added to data on trade and industrial production could likely set the stage for an increase in economic growth during the second quarter.

Gross domestic product estimates for the April-June period are above a 3.0 percent rate. The economy grew at a 2.2 percent pace in the first quarter.

Households dipped into their savings to fund purchases last month, with income growth remaining sluggish. Personal income rose 0.3 percent after a gain of 0.2 percent in March. Wages increased 0.4 percent. Savings fell to $419.6 billion last month from $445.7 billion in March.

But with the labor market rapidly tightening, there is hope that wage growth will gain steam.

Unemployment Claims Fall

There was a larger-than-expected decline in the number of Americans applying for unemployment benefits last week. Moderately rising inflation and a tightening labor market bolster expectation that the Federal Reserve will raise interest rates next month.

The Labor Department reported on Thursday morning that initial claims for state unemployment benefits fell by 13,000 claims to a seasonally adjusted 221,000 claims for the week ended May 26.

It is likely that the labor market is close to, or at full employment. The jobless rate is near a 17-1/2-year low of 3.9 percent, within striking distance of the Fed’s forecast of 3.8 percent by the end of this year.

Labor market strength is likely to be underscored by May’s employment report, which is scheduled for release on Friday.

Fed’s Beige Book

The Fed’s latest Beige Book report of anecdotal information on business activity collected from contacts nationwide indicated labor market conditions remained tight across the country in late April and early May.

The Fed said its contacts indicated that there was continued difficulty in filling positions across skill levels. There were notable shortages of truck drivers, sales personnel, carpenters, electricians, painters, and information technology professionals, the Fed said in its report published on Wednesday.