WASHINGTON (AP) — As President Joe Biden embarks for Asia on Thursday, he’s facing a new risk at home for the economy and his Democratic Party: a global slowdown caused by Russia’s invasion of Ukraine and the pandemic shutting down Chinese cities and factories.

The world economy can’t cast U.S. ballots. But it’s a hidden force in this year’s midterm elections and could influence whether Democrats retain control of the House and Senate.

It’s an additional challenge that highlights the steep climb for Biden, whose approval ratings have plunged as prices for everyday goods in the U.S. have soared.

Several economists said they think the U.S. is insulated from the rising energy costs that threaten Europe and from China’s decline in industrial output. But there are clear spillovers as high gasoline prices continue to weigh on voters’ minds and bank accounts.

Federal officials acknowledge that global events might make it harder for inflation to fall from near 40-year highs to levels that would assure the American public. Treasury Secretary Janet Yellen said Wednesday in Germany that she believes the strong job market means the U.S. can avoid the downturn being seen around the world.

“We have a great deal of economic momentum in the United States,” Yellen said. “But you know, this is an environment that is filled with risks, both with respect to inflation and also potential slowdowns.”

Yellen’s successor as chair of the Federal Reserve, Jerome Powell, said in a radio interview for Marketplace last week that the central bank’s ability to lower inflation while keeping the economy going could depend on what happens globally.

“There are huge events, geopolitical events going on around the world that are going to play a very important role in the economy in the next year or so,” Powell said. “So the question whether we can execute a soft landing or not, it may actually depend on factors that we don’t control.”

What’s clear is that foreign affairs and geopolitics have returned as issues that could shape the opinions of U.S. voters.

Even as the midterm races intensify, Biden is devoting his time to other world leaders — and not just Russian President Vladimir Putin and his attack on Ukraine. Biden’s trip to South Korea and Japan follows recent meetings with the heads of Italy, Greece and the members of the Association of Southeast Asian Nations. He is also meeting with the leaders of Finland and Sweden, who are seeking NATO membership, before he departs for Asia.

“Yes, geopolitics will matter for U.S. elections again,” said Doug Elmendorf, dean of Harvard University’s Kennedy School of Government and a former director of the Congressional Budget Office. “Terrorists and terrorist states have been potent, China is not becoming that much like us, and Putin has gone to war.”

Elmendorf noted that upheavals worldwide are expressing themselves in higher energy costs, efforts to bring home supply chains from abroad and increased spending on national security, all of which can “crowd out social spending and raise government borrowing.” That possibility could in some ways challenge Biden’s promises to lower inflation, trim the national deficit and boost spending on health care, children and education.

Robin Brooks, chief economist at the Institute for International Finance, has said that the European Union appears headed for recession as energy costs have climbed because of the war in Ukraine. Manufacturing output is stalling in China after coronavirus lockdowns, creating additional supply chain challenges for economies that rely on Chinese goods.

“The U.S. has some major advantages compared to the rest of the world,” Brooks said. “The biggest advantage has been the fact that it is a long way from Ukraine, unlike Western Europe where we now forecast recession for the Euro zone.”

Brooks added that the U.S. is also a leading oil and agricultural producer, so higher prices that are hurting Europe could actually help parts of the U.S. economy.

That’s in no way guaranteed. The aftershocks from Europe could, for instance, limit Biden’s ability to deal with inflation.

Fed Chair Powell has said there is little the U.S. central bank can do to address higher oil, food and commodity prices that are tied to geopolitics. Federal Reserve policies such as hiking interest rates or reducing the Fed’s balance sheets have little no impact on restarting shuttered factories abroad or generating more natural gas and oil production overseas. That complicates the administration’s message about the Fed’s ability to contain inflation that has become a leading worry for U.S. voters.

“Our tools don’t really work on supply shocks,” Powell said this month.

Adam Posen, president of the Peterson Institute for International Economics, said he expects the U.S. to be largely sheltered from Europe’s woes, though he sees major risks to growth as coming from U.S. politics.

He said Biden could take steps to improve the U.S. economy and fight inflation by reducing the tariffs imposed during the administration of Donald Trump and by expanding legal immigration. Those are politically controversial moves that Biden has been hesitant to take, actions that could alienate labor unions and some voters.

“We have an unreliable budget process and an inability to raise taxes, which contributes to inflation and volatility,” Posen said in an email. “We also have a hostile approach to trade and immigration because the Dems have mistakenly become convinced this is how they will win back Joe Sixpack, and the Republicans actually believe (wrongly) that foreigners and their products are dangerous.”