Shares of petroleum producers and suppliers were strong as oil prices rallied following a smaller-than-expected increase in American stockpiles. Halliburton rose 2.5 percent and EOG Resources 1.8 percent.
Beyond that, there were relatively few trading catalysts during the US session as far as economic data or corporate news. Analysts cited unease at the start of the Brexit process, even though it was expected.
The Dow Jones Industrial Average ended the session down 0.2 percent to 20,659.32.
The broad-based S&P 500 gained 0.1 percent to close the day at 2,361.13, while the tech-rich Nasdaq Composite Index climbed 0.4 percent to 5,897.55.
Several leading retailers scored gains, with Target adding 2.9 percent, Dollar Tree 2.6 percent and Wal-Mart Stores 0.6 percent.
Technology winners included Amazon, up 2.1 percent, and Google parent Alphabet, up 1.3 percent.
Vertex Pharmaceuticals surged 20.5 percent after releasing promising clinical results of a drug therapy combination for the treatment of cystic fibrosis.
Luxury furnishing retailer Restoration Hardware shot up 14.9 percent after projecting first-quarter revenues of between $530 million and $545 million, well above the $485 million expected by Wall Street analysts.