The S&P 500 closed 0.1 percent lower, erasing earlier gains, with information technology dropping more than 2.5 percent.
Prime Minster Theresa May's Conservative party lost its parliamentary majority in the process, coming up with 318 of 650 seats.
"All of the fundamentals are there for the market to go higher, but from time to time we become concerned with political uncertainty." The results sent the British pound spiraling lower to its weakest level since April 18 against the dollar.
The Dow Jones industrial average rose 89.44 points, or 0.42 percent, to close at 21,271.97, with Pfizer leading advancers and Apple the top decliner.
The S&P 500 slipped 2.02 points, or 0.08 percent, to end at 2,431.77, with information technology leading four sectors lower and energy outperforming.