Stocks rose on Tuesday as investors eagerly awaited the results of much-anticipated midterm elections which could have significant implications for investors.

The Dow Jones Industrial Average climbed 173.31 points to 25,635.01, led by gains in IBM and Caterpillar. The gained 0.6 percent to close at 2,755.45 as the industrials and materials sectors outperformed. The Nasdaq Composite advanced 0.6 percent to 7,375.96. All three of the major indexes reached their session highs less than 10 minutes before the close.

Democrats are expected to take control of the House away from Republicans while the GOP maintains a slim majority in the Senate. Stocks have historically done well under a divided government. Since 1928, the S&P 500 has averaged an annual return of 12 percent when Congress is split and Republicans control the White House.

But "this is a very different election and gridlock may not be good" for the market, said Gene Goldman, head of research at Cetera Investment Management. Goldman said the GOP-led government has implemented key policies that are helping the economy grow, and gridlock would slow down similar policies in the future.

Analysts at Bank of America Merrill Lynch said a split Congress is still the most likely outcome, but the probability of a Democratic blue wave in the House "appears to have diminished." The first polls close at 6 p.m. ET.

Whichever way the elections shake out, they could lead Congress to pursue different policy agendas, including lower drug prices, banking regulation and defense spending. The election could also lead to more investigations into President Donald Trump.