WASHINGTON — Republicans have taken control of the U.S. Senate and are fighting to keep their majority in the U.S. House, which would produce a sweep of GOP power in Congress alongside President-elect Donald Trump in the White House.

A unified Republican grip would set the course for Trump’s agenda. Or if Democrats wrest control of the House, it would provide an almost certain backstop, with veto power over the White House.

Trump, speaking early Wednesday at his election night party in Florida, said the results delivered an “unprecedented and powerful mandate” for Republicans.

He called the Senate rout “incredible.”

And he praised House Speaker Mike Johnson, who dashed from his own party in Louisiana to join Trump. “He’s doing a terrific job,” Trump said.

From the U.S. Capitol, Senate GOP Leader Mitch McConnell, privately a harsh Trump critic, called it a “hell of a good day.”

Vote counting in some races could go on for days, and control of the House is too early to call.

The rally for Republicans started early on election night in West Virginia, when Jim Justice, the state’s governor, flipped the seat held by retiring Sen. Joe Manchin. From there, the Republicans marched alongside Trump across the Senate map.

Republicans toppled Democrat Sen. Sherrod Brown in Ohio, the first incumbent senator to fall, with GOP luxury car dealer and entrepreneur Bernie Moreno. They chased Democrats in the “blue wall” states of Michigan, Pennsylvania and Wisconsin, where Vice President Kamala Harris strained to carry the party forward — though Democratic Sen. Tammy Baldwin in Wisconsin was reelected, and Democrat Elissa Slotkin won an open U.S. Senate seat in Michigan.

Democratic efforts to oust firebrand Republicans Ted Cruz of Texas and Rick Scott of Florida collapsed. The unexpected battleground of Nebraska pushed Republicans over the top. Incumbent GOP Sen. Deb Fischer brushed back a strong challenge from independent newcomer Dan Osborn.

One of the most-watched Senate races, in Montana, was decided early Wednesday. Democrat Jon Tester, a popular three-term senator, lost to Trump-backed Tim Sheehy, a former Navy SEAL who made derogatory comments about Native Americans, a key constituency in the state.

All told, Senate Republicans have a chance to scoop up more seats, potentially delivering their most robust majority in years — a coda to McConnell, who made a career charting a path to power, this time by recruiting Republicans aligned with Trump.

To gain control of the House, Democrats need to flip four seats from Republicans, while holding all of their own.

Voters elected two Black women to the Senate, Democrat Lisa Blunt Rochester of Delaware and Democrat Angela Alsobrooks, who defeated Republican Larry Hogan, the former governor, in Maryland. Just three Black women have served in the Senate, and never have two served at the same time.

And in New Jersey, Democrat Andy Kim became the first Korean American elected to the Senate. The seat opened when Bob Menendez resigned this year after his federal bribery conviction.

In the House, candidate Sarah McBride, a Democratic state lawmaker from Delaware, became the first openly transgender person elected to Congress.

What’s still unclear is who will lead the new Republican Senate.

South Dakota Sen. John Thune, the No. 2 Republican, and Texas Sen. John Cornyn, who previously held that post, are the front-runners to replace McConnell in a secret-ballot election scheduled for when senators arrive in Washington next week.