Foreign buying of U.S. homes was a driving factor in markets from California to Florida, helping prices reach new highs. Now, the pandemic, reduced travel and immigration restrictions are further undermining already weakening international demand.

Overseas residential real-estate purchases climbed steadily between 2011 and 2017, peaking at $153 billion in the year ended March 2017, according to the National Association of Realtors. About 60% of foreign buyers are recent immigrants or foreigners who live in the U.S., while others buy U.S. homes as investment properties or vacation homes, according to NAR.

Foreigners represent a tiny percentage of overall buyers. But because they have tended to cluster in coastal cities like New York, Miami and the Los Angeles area, they sometimes have had an exaggerated influence in these markets, especially at the higher-price end. Foreigners also were more likely to pay cash, making their offers more attractive to sellers.

Foreign appetite fell sharply in 2018 and 2019, according to NAR. Much of the buying came from China. It slowed in 2019 after the Chinese government implemented new controls over foreign currency purchases and as the country’s trade dispute with the U.S. heated up. A stronger dollar, which makes U.S. homes more expensive in foreign currencies, and concerns about global economic growth slowed overseas buying more broadly.

This year, demand looks likely to be even weaker, real-estate agents say.

Limited travel between the U.S. and other countries, worries about virus transmission and new restrictions on immigration could weigh on international investment in U.S. housing this year.

In the latest setback for foreign homeownership in the U.S., President Trump signed an order June 22 temporarily barring new immigrants on certain employment-based visas through the end of the year.

While the lack of overseas demand may disappoint homeowners in major coastal cities that attracted much of the foreign demand, local buyers who have lost out in bidding wars to deep-pocketed foreigners might be relieved.

“Some decline in international buying activity I don’t think necessarily harms the U.S. housing market,” said Lawrence Yun, NAR’s chief economist. “If anything, it doesn’t put any additional upward pressure on home prices, which have been a major concern for buyers on the affordability front.”

Home prices have continued to rise during the pandemic, even as the rate of home sales has dropped. The supply of homes for sale remains limited in many markets, and demand from buyers has increased in recent weeks as business activity has opened up in many states and mortgage rates have stayed low.

Foreign investment in U.S. housing can push up local home prices in select markets, according to a working paper released last monthby Caitlin Gorback and Benjamin Keys of the University of Pennsylvania.

The paper found that in ZIP Codes with a high proportion of foreign-born Chinese, house prices between 2012 and 2018 grew by 8 percentage points more than in comparable ZIP Codes. These areas, which in many cases also attracted strong local demand, could be vulnerable to price erosion as both domestic and foreign buying pulls back.

“The neighborhoods that are highly exposed to foreign investment on the upside are also exposed on the downside,” Mr. Keys said.

Many foreign investors buy homes for their children to live in while attending school in the U.S., and those purchases are on hold while families wait to see whether schools will be open in the fall, said Vicky Silvano, broker at Baird & Warner in Chicago.

“Because of the pandemic, the people that I work with are just on a ‘wait and see’ right now,” Ms. Silvano said. For foreign investors who own homes in the U.S., “I think there’s going to be more selling if the kids don’t come back to school” this year, she said.

Indiana University has drawn many foreign buyers to Bloomington, Ind., in the past decade, said Tracee Lutes, broker owner at Re/Max Acclaimed Properties.

“I think we will have a lot fewer foreign investment buyers here this year…with the uncertainty in the university plans and the uncertainty in the Covid situation,” she said.

Indiana University said in May that it plans to open in the fall for a mix of in-person and online classes.

Housing demand is strong in Bloomington, and a decline in foreign investment could be a boon to local shoppers, Ms. Lutes said: “I think you would see more in-state people, local people, that would take advantage of the ability to buy.”

Still, some see foreign buying picking up once normal travel resumes. In New Jersey and New York, Grace Tan of Prominent Properties Sotheby’s International Realty said her international clients in countries like China are already planning to shop for homes in the U.S. once international travel picks up.

“These clients are still not comfortable buying virtually,” she said. “They will come back. I already get the phone calls.”