WASHINGTON (AP) — President Joe Biden has notched an envious record on jobs, with 10.3 million gained during his tenure. But voters in Tuesday’s midterm elections are far more focused on inflation hovering near 40-year highs.

That’s left the president trying to convince the public that the job gains mean better days are ahead, even as fears of a recession build.

Presidents have long trusted that voters would reward them for strong economic growth, but inflation has thrown a monkey wrench into the already difficult probability of Democrats’ retaining control of the House and Senate.

Economic anxieties have compounded as the Federal Reserve has repeatedly hiked its benchmark interest rates to lower inflation and possibly raise unemployment. Mortgage costs have shot upwards, while the S&P 500 stock index has dropped more than 20% so far this year as the world braces for a possible downturn.

Biden is asking voters to look beyond the current financial pain, saying that what matters are the job gains that he believes his policies are fostering. The government reported Friday that employers added 261,000 jobs in October as the unemployment rate bumped up to 3.7%.

Roughly 740,000 manufacturing jobs have been added since the start of Biden’s presidency, a figure that the president says will keep rising because of his funding for infrastructure projects, the production of computer chips and the switch to clean energy sources.

“America is reasserting itself — it’s as simple as that,” Biden said in a Friday speech. “We also know folks are still struggling with inflation. It’s our number one priority.”

Yet the president is also warning that a Republican majority in Congress could make inflation worse by seeking to undo his programs and treating payments on the federal debt as a bargaining chip instead of an obligation to honor.

His challenge is that the party in power generally faces skeptical voters in U.S. midterms and inflation looms over the public mindset more than job growth.

“If you have a job, it’s small comfort to know that the job market is strong if at the same time you feel like every paycheck is worth less and less anyway,” said pollster Kristen Soltis Anderson. “Inflation is such political poison because voters are reminded every day whenever they spend money that it is a problem we are experiencing.”

As Biden tries to fend off fears that inflation is causing the country to slide into a recession, his chief evidence of the economy’s resilience is the continued job growth.

“As we see the economy as a whole, we do not see it going into a recession,” White House press secretary Karine Jean-Pierre told reporters in anticipation of the latest jobs report.

Going into the election, Biden and Democrats are already at a disadvantage. Voters generally favor the party out of the White House in midterms, giving Republicans an automatic leg up. When Yale University economist Ray Fair looked at past elections, his model forecast that Democrats would get just 46.4% of the national vote largely because Biden was in the Oval Office.

Fair’s analysis suggests that inflation basically erased the political boost that Democrats could have gotten from strong economic growth during three quarters in 2021. Even if the economy is top of mind for many voters, the conflicting forces of past growth and high inflation cancel out each other.

This makes the Democrats’ vote share roughly the same as suggested by the historical trend, Fair concluded.

But inflation compounds the obstacles for a president who has tried to convey optimism as he tours the country in the run-up to the elections. Research in social psychology and behavioral economics generally shows that people often focus on the negatives and can block out the positives.

“People pay more attention to bad news than to good news and are more likely to retain and recall bad news,” said Matthew Incantalupo, a political scientist at Yeshiva University.

Incantalupo’s research looks at how voters absorb economic news. When unemployment is low, as it is now, he said, voters generally think about jobs as a personal issue — rather than a systemic one involving government policies. But most think about inflation as a social problem beyond any person’s control, unless that individual happens to run the Fed.

“When it is high, everyone experiences it at least a little bit, and there really is no individual way to avoid it,” Incantalupo said. “Voters are going to look to government for remedies under those circumstances, and in many cases that will result in them punishing incumbents, even in the presence of other positive news about the economy.”

Republican candidates have specifically said Biden’s $1.9 trillion coronavirus relief package last year overheated the economy, causing prices to rise alongside the job gains that they claim would have happened anyway as the pandemic receded. They have also said that Biden should have loosened restrictions on oil production, in order to increase domestic output and lower gasoline prices.

House Republican leader Kevin McCarthy — who could become speaker if the GOP wins a House majority — has hammered Biden on high prices. As Biden has warned that Republicans who deny the outcome of the 2020 election are a threat to democracy, the California congressman countered that what voters care about are the costs of gas and groceries.

“President Biden is trying to divide and deflect at a time when America needs to unite — because he can’t talk about his policies that have driven up the cost of living,” McCarthy tweeted this past week. “The American people aren’t buying it.”

Still, inflation is not solely a domestic issue. After Russia invaded Ukraine, energy and food costs rose and suddenly flipped the global dynamics as inflation rose faster in parts of the world with less aggressive coronavirus relief than the U.S. Annual inflation in the euro zone is a record 10.7%, much higher than the 8.2% in the U.S.

Meanwhile, growth has slowed in China, the pace of world trade is slipping and Saudi Arabia-led OPEC+ has cut oil production in order to prop up prices. And because the Fed is raising rates to lower domestic inflation, the dollar has increased in value and essentially exported higher prices to the rest of the world.

This has left U.S. voters in the curious position of not necessarily blaming the president for inflation, even as they disapprove of his economic leadership.

An October poll by AP-NORC Center for Public Affairs captured this split. More than half of voters say that prices are higher because of factors beyond Biden’s control. But just 36% approve of his economic leadership.