WASHINGTON — Control of Congress is at stake Tuesday, with ever-tight races for the House and Senate that will determine which party holds the majority and the power to boost or block a president’s agenda, or if the White House confronts a divided Capitol Hill.

The key contests are playing out alongside the first presidential election since the Jan. 6, 2021, attack on the Capitol, but also in unexpected corners of the country after one of the most chaotic congressional sessions in modern times.

In the end, just a handful of seats, or as little as one, could tip the balance in either chamber.

The economy, border security, reproductive rights and even the future of U.S. democracy itself have all punctuated the debate.

In the Senate, where Democrats now have a slim 51-49 majority, an early boost for Republicans is expected in West Virginia. Independent Sen. Joe Manchin’s retirement creates an opening that Republican Jim Justice, now the state’s governor, is favored to win. A pickup there would deadlock the chamber, 50-50, as Republicans try to wrest control.

Top House races are focused in New York and California, where in a politically unusual twist, Democrats are trying to claw back some of the 10 or so seats where Republicans have made surprising gains in recent years with star lawmakers who helped deliver the party to power.

Other House races are scattered around the country in a sign of how narrow the field has become, with just a couple of dozen seats being seriously challenged, some of the most contentious in Maine, the “blue dot” around Omaha, Nebraska, and in Alaska.

Vote counting in some races could extend well past Tuesday.

“We’re in striking distance in terms of taking back the House,” House Democratic Leader Hakeem Jeffries, who is in line to make history as the first Black speaker if his party wins control, said during a recent campaign swing through Southern California.

But House Speaker Mike Johnson predicts Republicans will keep “and grow” the majority. He took over after Rep. Kevin McCarthy was booted from the speaker’s office.

Capitol Hill can make or break a new White House’s priorities, giving Donald Trump or Kamala Harris potential allies or adversaries in the House and Senate, or a divided Congress that could force a season of compromise or stalemate.

Congress can also play a role in upholding the American tradition of peacefully transferring presidential power. Four years ago, Trump sent his mob of supporters to “fight like hell” at the Capitol, and many Republicans in Congress voted to block Joe Biden’s election. Congress will again be called upon to certify the results of the presidential election in 2025.

What started as a lackluster race for control of Congress was instantly transformed once Harris stepped in for Biden at the top of the ticket, energizing Democrats with massive fundraising and volunteers that lawmakers said reminded them of the Obama-era enthusiasm of the 2008 election.

Billions of dollars have been spent by the parties, and outside groups, on the narrow battleground for both the 435-member House and 100-member Senate.

Democrats need to win a handful of House seats to pluck party control from Republicans. In the Senate, the vice president becomes the tie-breaker in a split, which would leave control of that chamber up to the winner of the White House.

Senate Republicans recruited wealthy newcomers to put Democratic incumbents on defense in almost 10 states.

In Ohio, Trump-backed Republican Bernie Moreno, a Cleveland businessman, is seeking to unseat three-term Democratic Sen. Sherrod Brown. Some $400 million has been spent on the race.

One of the most-watched Senate races, in Montana, may be among the last to be decided.

Democratic Sen. Jon Tester, a popular three-term senator and self-described “dirt farmer,” is in the fight of his political career against Trump-backed Tim Sheehy, a wealthy former NAVY Seal, who has been questioned about being shot and who made derogatory comments about Native Americans, a key constituency in the Western state.

And across the “blue wall” battlegrounds of Pennsylvania, Michigan and Wisconsin, Republicans are depending on Trump as they try to unseat a three incumbent Democratic senators.

Outgoing Senate Republican leader Mitch McConnell has spent a career focused on seizing and keeping majority power, but other chances for Republicans are slipping into long shots.

In the Southwestern states, Arizona firebrand Republican Kari Lake has struggled against Democrat Ruben Gallego in the seat opened by Sen. Krysten Sinema’s retirement. In Nevada, Democratic Sen. Jacky Rosen has been holding out against newcomer Sam Brown.

Democrats intensified their challenges to two Republican senators — Sen. Ted Cruz of Texas and Sen. Rick Scott in Florida — in states where reproductive rights have been a focus in the aftermath of the Supreme Court decision rolling back abortion access. Cruz faces Democrat Colin Allred, a Dallas-area congressman, while Scott has poured $10 million of his own fortune into the race against Debbie Mucarsel- Powell, a former House lawmaker.