Control of Congress hung in the balance Wednesday as Democrats showed surprising strength, defeating Republicans in a series of competitive races and defying expectations that high inflation and President Joe Biden’s low approval ratings would drag the party down. In the most heartening news for Democrats, John Fetterman flipped Pennsylvania’s Republican-controlled Senate seat that’s key to the party’s hopes of maintaining control of the chamber. It was too early to call critical Senate seats in Wisconsin, Nevada, Georgia and Arizona that could determine the majority. In the House, Democrats kept seats in districts from Virginia to Kansas to Rhode Island, while many districts in states like New York and California had not been called.Democrats also were successful in governors’ races, winning in Wisconsin, Michigan and Pennsylvania – battlegrounds critical to Biden’s 2020 win over Donald Trump. But Republicans held on to governors’ mansions in Florida, Texas and Georgia, another battleground state Biden narrowly won two years ago. With votes still being counted across the country, Republicans maintained an opportunity to win control of Congress. But the results were uplifting for Democrats who had braced for sweeping losses – and raised questions about the size of Republicans’ governing majority if they win the House. Rep. Kevin McCarthy, the Republican poised to be House speaker if the GOP takes control of the chamber, was optimistic, telling supporters, ‘When you wake up tomorrow, we will be in the majority.’ Democratic House Speaker Nancy Pelosi countered that her party would hold the chamber: ‘While many races remain too close to call, it is clear that House Democratic Members and candidates are strongly outperforming expectations across the country.’ The outcome of races for House and Senate will determine the future of Biden’s agenda and serve as a referendum on his administration as the nation reels from record-high inflation and concerns over the direction of the country. Republican control of the House would likely trigger a spate of investigations into Biden and his family, while a GOP Senate takeover would hobble the president’s ability to make judicial appointments.Democrats faced historic headwinds. The party in power almost always suffers losses in the president’s first midterm elections, but Democrats bet that anger from the Supreme Court’s decision to gut abortion rights might energize their voters to buck historical trends.In Pennsylvania, Fetterman had faced questions about his fitness for office after suffering a stroke just days before the state’s primary. But he nonetheless bested Republican Dr. Mehmet Oz in a major rebuke to Trump, whose endorsement helped Oz win the GOP’s hard-fought primary. ‘I’m so humbled,’ Fetterman, wearing his signature hoodie, told his supporters early Wednesday morning. ‘This campaign has always been about fighting for everyone who’s ever been knocked down that ever got back up.’Democrats also held a crucial Senate seat in New Hampshire, where incumbent Maggie Hassan defeated Republican Don Bolduc, a retired Army general who had initially promoted Trump’s lies about the 2020 election being marred by widespread fraud that did not occur but tried to shift away from some of the more extreme positions he took during the GOP primary. Also in Pennsylvania, Democratic Attorney General Josh Shapiro beat Republican Doug Mastriano to keep the governorship of a key presidential battleground state blue. Shapiro’s victory rebuffed an election denier who some feared would not certify a Democratic presidential win in the state in 2024. Democrats Tony Evers in Wisconsin, Gretchen Whitmer of Michigan, Kathy Hochul of New York, Michelle Lujan Grisham of New Mexico and Janet Mills of Maine also repelled Republican challengers.Incumbent Republican governors had some success. Georgia Gov. Brian Kemp won reelection, defeating Stacey Abrams in a rematch of their 2018 race. Florida Gov. Ron DeSantis and Texas Gov. Greg Abbott, two future possible Republican presidential contenders, beat back Democratic challengers to win in the nation’s two largest red states. AP VoteCast, a broad survey of the national electorate, showed that high inflation and concerns about the fragility of democracy were heavily influencing voters. Half of voters said inflation factored significantly, with groceries, gasoline, housing, food and other costs that have shot up in the past year. Slightly fewer – 44% – said the future of democracy was their primary consideration. Biden didn’t entirely shoulder the blame for inflation, with close to half of voters saying the higher-than-usual prices were more because of factors outside of his control. And despite the president bearing criticism from a pessimistic electorate, some of those voters backed Democratic candidates.Overall, 7 in 10 voters said the ruling overturning the 1973 decision enshrining abortion rights was an important factor in their midterm decisions. VoteCast also showed the reversal was broadly unpopular. About 6 in 10 say they are angry or dissatisfied by it, while about 4 in 10 were pleased. And roughly 6 in 10 say they favor a law guaranteeing access to legal abortion nationwide.There were no widespread problems with ballots or voter intimidation reported around the country, though there were hiccups typical of most Election Days. In the first national election since the Jan. 6 insurrection, some who participated in or were in the vicinity of the attack on the U.S. Capitol were poised to win elected office. One of those Republican candidates, J.R. Majewski, who was at the U.S. Capitol during the deadly riot and who misrepresented his military service, lost to Democratic Rep. Marcy Kaptur.Democratic Reps. Abigail Spanberger and Jennifer Wexton held off spirited Republican challengers in Virginia districts the GOP had hoped to flip.The 2022 elections are on track to cost a projected $16.7 billion at the state and federal level, making them the most expensive midterms ever, according to the nonpartisan campaign finance tracking organization OpenSecrets.Trump lifted Republican Senate candidates to victory in Ohio and North Carolina. JD Vance, the bestselling author of ‘Hillbilly Elegy,’ defeated 10-term congressman Tim Ryan, while Rep. Ted Budd beat Cheri Beasley, the former chief justice of the state Supreme Court.Trump had endorsed more than 300 candidates across the country, hoping the night would end in a red wave he could ride to the 2024 Republican presidential nomination. After summoning reporters and his most loyal supporters to a watch party at his Mar-a-Lago club in Florida on Tuesday, he ended the night without a triumphant speech. Nonetheless, the former president insisted on social media that he’d had ‘A GREAT EVENING.’Biden, meanwhile, spent the night calling Democrats to congratulate them on their wins.In governors’ races, the GOP faced unexpected headwinds in flipping the office in conservative Kansas, while Democrats were nervous about their prospects in the race in Oregon, typically a liberal bastion.Despite their liberal history, states like Massachusetts, Maryland and Illinois have elected moderate Republican governors in the past. But the Republican candidates this year appeared to be too conservative in these states, handing Democrats easy victories.Massachusetts and Maryland also saw historic firsts: Democrat Maura Healey became the first woman elected as Massachusetts governor, as well as the first openly lesbian governor of any state, and Wes Moore became the first Black governor of Maryland.Healey bested Geoff Diehl in Massachusetts and Moore beat Dan Cox in Maryland, while Illinois Gov. J.B. Pritzker defeated state Sen. Darren Bailey. Bolduc, Cox and Bailey were among the far-right Republicans that Democrats spent tens of millions of dollars to bolster during the primaries, betting they would be easier to beat in general elections than their more moderate rivals.___Associated Press writer Hannah Fingerhut contributed. ___Follow the AP’s coverage of the 2022 midterm elections at https://apnews.com/hub/2022-midterm-elections. And learn more about the issues and factors at play in the midterms at https://apnews.com/hub/explaining-the-elections.