(CNBC) — Stocks closed well off session lows on Wednesday after the White House hinted Canada and Mexico could be exempt from tariffs proposed by President Donald Trump.

The Dow Jones industrial average ended 80 points lower after falling more than 300 points. The S&P 500 closed just below breakeven after falling nearly 1 percent. Real estate and tech were the best-performing sectors. The Nasdaq composite closed 0.4 percent higher, hitting a session high in late-afternoon trade, as shares of Facebook and Alphabet rose 2.2 percent and 1.3 percent, respectively.

White House press secretary Sarah Huckabee Sanders said the plan could include carve-outs for Mexico and Canada, two key U.S. trade partners. Trump is expected to release more details on his tariffs plan on Thursday or Friday.

Note: Read our discussion guidelines before commenting.