WASHINGTON — Democrats' hopes of winning a Senate majority appeared lost Tuesday as Republicans kept their seats in Indiana, North Carolina and Wisconsin and were leading hard-fought races to retain their seats in Missouri and New Hampshire.

Democrats picked up a seat in Illinois and were ahead in Pennsylvania and Nevada, where they were fighting to hold the seat held for 30 years by Sen. Harry Reid.

Democrats needed a net gain of five seats to win a majority, or four seats to split the Senate 50-50. In the event of an evenly divided Senate, the party that wins the White House would effectively win the Senate majority since the vice president acts as the tie-breaking vote.

Democratic Rep. Tammy Duckworth ousted Republican Sen. Mark Kirk in Illinois. Duckworth, who was first elected to the House in 2012, lost both of her legs in combat in Iraq; Kirk suffered a stroke during his only term in the Senate.

Democrats also were leading in Pennsylvania, with former state environmental chief Katie McGinty ahead of Republican Sen. Pat Toomey. In Nevada, Democratic former attorney general Catherine Cortez Masto was leading Republican Rep. Joe Heck in early returns as they competed for the open seat of retiring Senate Minority Leader Reid.

In Indiana, Republican Rep. Todd Young beat two-term former senator Evan Bayh for an open seat created by the retirement of GOP Sen. Dan Coats. Bayh was a late entrant to the race and had an early lead in polls. And in North Carolina, GOP Sen. Richard Burr, chairman of the Senate Intelligence Committee, defeated Democratic former state representative Deborah Ross.

But the most unexpected victory for Republicans was in Wisconsin, where GOP Sen. Ron Johnson won a rematch against Democratic former Sen. Russ Feingold, who had led Johnson by double digits in polls just a few weeks ago.

The party that controls the Senate will help determine whether the new president can push his or her agenda through Congress for the next two years. If the early trend holds, the Republicans would maintain control, which would give them power over both chambers of Congress for another two years. If Republican presidential nominee Donald Trump wins, the GOP will hold the executive and legislative branches.

Democrats believed they could wrench the majority away from Republicans because the GOP had so many more seats to defend this year. There were 24 Republican-held seats on state ballots Tuesday and only 10 Democratic-held seats.

There was at least one state, Louisiana, where the outcome of the Senate election may not be known for weeks.

In Louisiana, there were 24 candidates vying to fill the open seat of retiring Republican Sen. David Vitter. Unless one of them received at least 50% of the vote, which is unlikely, there will be a runoff between the top two vote-getters on Dec. 10. Republicans are expected to keep the seat.

PHOTOS: Election Day in America 2016