NEW YORK (Reuters) - The S&P 500 ended slightly lower after Wednesday’s volatile session as investors struggled to get a read on U.S. trade policy after President Donald Trump promised hefty import tariffs but then said Mexico and Canada could be exempt.

After falling as much as 0.97 percent, the S&P regained ground after the White House appeared to add exceptions to its stated plan to slap import tariffs of 25 percent on steel and 10 percent on aluminum.

Worries about a potential trade war had intensified after free trade supporter Gary Cohn resigned from his position as Trump’s top economic advisor late Tuesday.

But late on Wednesday White House spokeswoman Sarah Sanders said Trump is expected to sign something by the end of the week with “potential carve-outs for Mexico and Canada based on national security, and possibly other countries as well”

“It makes investors less worried if the tariff isn’t applied so broadly. But it’s speculation at this point. We have nothing in writing. If there’s one thing we’ve learned from this administration it’s that it could change by the time it’s in writing,” Janna Sampson, co-chief investment officer at OakBrook Investments LLC in Lisle, Illinois.

The Dow Jones Industrial Average .DJI fell 82.76 points, or 0.33 percent, to end at 24,801.36, the S&P 500 .SPX lost 1.32 points, or 0.05 percent, to 2,726.8 and the Nasdaq Composite .IXIC added 24.64 points, or 0.33 percent, to 7,396.65.

The Dow was dragged down partly by manufacturer stocks such as Caterpillar CAT.N, which fell 1.5 percent, and Boeing BA.N, which ended 0.5 percent lower.

Slideshow ( 3 images )

Both those stocks have been under pressure since the tariff plan was first announced on Thursday as they could be hurt by both higher metal prices and any retaliatory trade barriers erected by foreign countries where they sell their products.

The S&P energy sector .SPNY was one of the weakest of the S&P's 11 sectors with a 0.8 percent drop as it was also weighed down by a 2 percent drop in oil prices CLc1 from data showing a rise in U.S. inventories and output. [O/R]

The Russell 2000 index .RUT, which tracks U.S. small-cap stocks, outperformed the larger-cap indexes with a 0.8 percent gain. Its more domestically focused companies are seen as having less exposure if foreign governments retaliate by slapping tariffs on U.S. exports.

The S&P's technology index .SPLRCT was also a bright spot with a 0.6 percent increase. Its biggest boosts came from a 2.2 percent increase in Facebook FB.O and a 14.9 percent jump in shares of software supplier Autodesk ADSK.O after its quarterly report.

Advancing issues outnumbered declining ones on the NYSE by a 1.09-to-1 ratio; on Nasdaq, a 1.68-to-1 ratio favored advancers.

The S&P 500 posted 14 new 52-week highs and three new lows; the Nasdaq Composite recorded 147 new highs and 19 new lows.

Volume on U.S. exchanges was roughly 6.74 billion shares, compared to the 7.79 billion average for the last 20 sessions.