(CNBC) — U.S. equities closed higher Wednesday but backlash from the business community against President Donald Trump kept gains in check.

The S&P 500 gained just 0.1 percent, with materials outperforming. The index rose as much as 0.4 percent.

The Dow Jones industrial average closed about 26 points higher with Home Depot and United Technologies contributing the most gains. The Nasdaq composite advanced 0.2 percent as shares of Apple hit a record high.

Note: Read our discussion guidelines before commenting.