WASHINGTON (AP) — High inflation and fears about democracy’s health weighed heavily on U.S. voters in a midterm election in which once — and perhaps future — rivals for the White House, Joe Biden and Donald Trump, cast a shadow, AP VoteCast shows.

The survey depicts a country in distress at a moment when control of Congress — and a choice between sharply contrasting visions of America — hang in the balance. Much of the country is mired in pessimism about America’s future and its political leadership, with lingering tensions in how people feel about the current president and his predecessor shaping choices at the ballot box.

The detailed portrait of the American electorate is based on preliminary results from VoteCast, an extensive survey of more than 90,000 voters nationwide conducted for The Associated Press by NORC at the University of Chicago.

About half of voters say inflation factored significantly in their vote, as groceries, gasoline, housing, food and other costs have shot up in the past year, giving Republicans a vehicle for criticizing Biden. The economy was an overarching concern with voters, about 8 in 10 of whom said it was in bad shape as inflation, near a 40-year high, has raised fears of a recession. Voters are split as to whether Biden’s policies caused higher prices, or factors beyond his control, such as Russia’s invasion of Ukraine.

Slightly fewer voters — 44% — say the future of democracy was their primary consideration. On the campaign trail, Biden has warned that Republicans are posing a threat to democracy. Many GOP leaders continue to cast doubt on the U.S. electoral system, falsely claiming that the 2020 presidential election, which Trump lost, was rigged.

Yet the “Make America Great Again,” or MAGA, movement sparked by Trump appears to have tightened its grip on Republicans. Nearly two-thirds of GOP voters say they support the MAGA movement, a sign of the potential gridlock with Biden’s White House should Republicans win majorities in the House or Senate.

Republicans are counting on voter dissatisfaction with inflation, crime and immigration to help them take control of both chambers of Congress. Biden and his fellow Democrats have argued that the U.S. middle class is poised for a renaissance because of their investments on infrastructure, computer chip production and clean energy projects.

Voters for both parties consider inflation and the fate of democracy to be important. But Republicans were more likely to rank the economy as the top factor in their vote, while Democrats were more likely to prioritize the future of democracy.

Voters have become increasingly demoralized as the country’s political divisions have hardened. Roughly three-quarters say the country is headed in the wrong direction. That figure is higher than it was in the VoteCast survey of voters in 2020, at the height of the coronavirus pandemic.

Two years ago, the COVID-19 pandemic was considered the country’s top issue; now just 2% of voters name it the top priority as other issues have taken center stage.

Biden’s election was in part because of views that the pandemic was out of control under Trump’s leadership, VoteCast showed. A majority of voters said they thought he “cares about people like them.” A smaller percentage of 2022 voters say that.

Even Democrats harbor doubts about Biden, who has said he plans to seek reelection in 2024. Nearly a third of voters for Democratic congressional candidates say Biden is not a strong leader. One in five Democrats says he lacks the mental capability to serve effectively as president. And about 3 in 10 disapprove of his economic leadership.

The 2020 presidential election still hangs over these congressional, state and local races. Almost two-thirds of Democratic voters said they cast ballots to show opposition to Trump, while about 7 in 10 Republican voters said their votes were about defying Biden.

Inflation has been a clear blow to the well-being of many Americans. A third of voters describe their families as falling behind financially. That’s nearly double the percentage of the electorate that said the same two years ago.

About half of voters in the suburbs backed Democrats nationally, slightly less than in 2020 and 2018. Democrats still fare better with women, while men are more likely to prefer Republicans. Voters under 45 tend to favor Democrats; older voters generally lean Republican.

Facing headwinds on the economy, Biden and many Democratic candidates sought to tap their base’s outrage after the Supreme Court overturned the abortion protections in Roe v. Wade, the 1973 decision enshrining the right to abortion. Overall, 7 in 10 voters say the ruling was an important factor in their midterm decisions.

VoteCast also shows 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.

Crime also was an important factor for most voters, and half say the Biden administration has made the U.S. less safe from crime.

Despite concerns about democracy, about 4 in 10 voters say they are “very” confident that votes in the midterm elections will be counted accurately, an improvement from the percentage of the 2020 electorate that said so.

Many voters came into the election with entrenched views. About half say they knew all along how they would vote, while a third decided over the course of the campaign, and roughly 1 in 10 say they made their choice in the last few days.

___

AP VoteCast is a survey of the American electorate conducted by NORC at the University of Chicago for Fox News and The Associated Press. The survey of 93,406 voters was conducted for nine days, concluding as polls closed. Interviews were conducted in English and Spanish. The survey combines a random sample of registered voters drawn from state voter files; self-identified registered voters using NORC’s probability-based AmeriSpeak panel, which is designed to be representative of the U.S. population; and self-identified registered voters selected from nonprobability online panels. The margin of sampling error for voters is estimated to be plus or minus 0.5 percentage points. Find more details about AP VoteCast’s methodology at https://ap.org/votecast.