WASHINGTON (AP) – Control of Congress was up for grabs Tuesday as Republicans’ hopes of protecting their narrow majority in the Senate rested on a handful of states that were toss-ups until the end.

Republicans were expected to retain House control amid Democratic gains that are expected to be modest.

In North Carolina and Missouri, Democrats sought to upset entrenched GOP incumbent senators. In Democratic-leaning states like Wisconsin, Illinois, Nevada, New Hampshire and Pennsylvania, Democrats were trying to tie their GOP opponents to Donald Trump.

Democrats needed to pick up four seats to take the Senate majority if Hillary Clinton wins the White House and can send her vice president to cast tie-breaking votes in a 50-50 Senate. They need five seats if Trump wins.