WASHINGTON – Democrats gained control of the House and Republicans expanded their majority in the Senate, but the final numbers remained uncertain early Wednesday morning as several races remained undecided in each chamber.

Democrats notched key wins in suburban districts from Virginia to Colorado to Florida and were projected to win more than the 23 seats they need to gain control of the House. Several races remained too close to call.

In the Senate, Republicans expanded their majority after Democratic incumbents lost seats in Indiana, North Dakota and Missouri and GOP senators won closely watched races in Texas and Tennessee. Still undecided were key races in Florida, Arizona and Montana.

In governor’s races, Democrats scored a surprising win in Kansas, while in Florida the Republican beat back a challenge in one of the most closely watched races in the country. A winner still hasn’t been declared in gubernatorial contests in Georgia and Wisconsin.

More:Elections 2018: Complete race results

House

Democrats needed a net gain of 23 House seats to wrest control of the House from Republicans. As of midnight, Democrats had won at least that many, riding a wave of anti-Trump angst in suburban districts, where women voters in particular were uneasy with the president's tenure.

Democrat Donna Shalala defeated Republican Maria Elvira Salazar in Florida to replace retiring GOP Rep. Ileana Ros-Lehtinen. Shalala served for eight years as Health and Human Services secretary under President Bill Clinton.

In Northern Virginia, Democrat Jennifer Wexton, a state senator and former prosecutor, defeated Republican Congresswoman Barbara Comstock, giving Democrats another pickup in Tuesday's midterm elections.

In another closely watched race, Republican Andy Barr of Kentucky fended off a challenge from Democrat Amy McGrath. Rep. Hal Rogers, R-Ky., won re-election over Democratic challenger Kenneth Stepp.

Senate

Texas Sen. Ted Cruz has been elected to a second term. Cruz, a Republican, fought off a tough challenge from Democratic Beto O'Rourke.

In Tennessee, Republican Marsha Blackburn defeated Democrat Phil Bredesen in one of the country's most closely watched contests. Blackburn, a staunch conservative and supporter of President Donald Trump, will become the first woman to represent the Volunteer State in the Senate. She will succeed retiring Republican Sen. Bob Corker.

In Indiana, Republican Mike Braun defeated incumbent Joe Donnelly, giving the Republicans an important pickup seat from the Democrats, according to ABC and NBC. In West Virginia, Democrat Joe Manchin won re-election, beating Republican challenger Patrick Morrissey, the state attorney general.

Republican Josh Hawley beat Democratic Sen. Claire McCaskill in Missouri. Hawley is the state's attorney general.

Republican Kevin Cramer defeated Democratic Sen. Heidi Heitkamp of North Dakota, according to NBC and ABC. Heitkamp, who was elected six years ago, had been considered the most vulnerable in Democrat in the Senate.

Vermont Sen. Bernie Sanders, an independent, was elected to a third term by beating Republican Lawrence Zupan. The Associated Press called the race for Sanders, an independent, shortly after polls closed at 7 p.m.

Sen. Elizabeth Warren, D-Mass., was elected to a second term, according to the AP. Sen. Tim Kaine, D-Va., also won re-election, according to CNN and NBC.

Governor's contests

Democrat Laura Kelly was elected governor of Kansas in one of the most closely watched gubernatorial races in the country. Kelly defeated Republican Kris Kobach, the Kansas secretary of state, in a surprising victory, according to NBC and ABC.

In another hard-fought race, Republican Ron DeSantis was elected governor of Florida, beating back a strong challenge from Democrat Andrew Gillum.

Gillum, the mayor of Tallahassee, conceded shortly before 11 p.m. Gillum said while he was not going to serve as Florida’s governor, he was not going away.

“I want to encourage you not to give up,” he told supporters Tuesday evening. “I still plan to be on the front lines by every single one of you.”

Democrat Jared Polis was elected governor of Colorado, making history as the first openly gay man to win a gubernatorial election. Polis, who has served in the U.S. House for nine years, defeated Republican Walker Stapleton.

Youngest member of Congress

Democrat Alexandria Ocasio-Cortez has defeated a little-known Republican opponent in a district representing part of New York City.

Her victory Tuesday over economics professor Anthony Pappas was widely expected after Ocasio-Cortez scored an unanticipated upset over 10-term U.S. Rep. Joe Crowley in the Democratic primary in June.

At 29 years old, Ocasio-Cortez could become the youngest member of Congress.

She is one of a handful of congressional candidates who identified as democratic socialists.

Another interesting race

Kim Davis, the Kentucky county clerk who went to jail for refusing to issue marriage licenses to gay couples, lost her bid for re-election. Davis, a Republican, was defeated by Democrat Elwood Caudill Jr. in the race for Rowan County Clerk. Davis called Caudill to concede, according to news reports.

Voting problems

A national hotline for problems at the polls fielded complaints from voters and volunteers in Georgia, Arizona, Florida, New York, Michigan and Texas. Polling sites didn’t open on time, machines weren’t working, and in some cases paper ballots weren’t available.

In Georgia, a state with a hotly contested gubernatorial election, some voters reported waiting up to three hours to vote.

More than 100 people took turns sitting in children’s chairs and on the floor as they waited in line for hours at a polling place in Snellville, Georgia, the Associated Press reported. Voting machines at the Gwinnett County precinct did not work, so poll workers offered provisional paper ballots while trying to get a replacement machine, according to the AP.

In Arizona, voters in one town outside Phoenix showed up to vote only to find their polling place had been foreclosed upon the day before. The landlord of the building, which appeared to be a strip mall, locked it overnight – with ballots inside – after workers already had set up the polling place, Maricopa County Recorder Adrian Fontes said.

Poll workers set up a temporary polling place in the parking lot. The building finally opened just after 9 a.m., but it took another 90 minutes for voting to begin. The site's first voter, who identified himself only as Mike B., said he waited for more than four hours.

Contributing: USA TODAY reporters Williams Cummings, John Bacon, Donovan Slack, Bart Jansen and Deborah Barfield Berry, The Associated Press and Arizona Republic reporters Alden Woods and Jessica Boehm.