When the coronavirus pandemic shut down in-person real estate activity, Realtor Stacey DeLong was understandably scared.

“I thought, ‘There goes the year,’ ” said DeLong, owner of the Stacey DeLong Group with Keller Williams Montgomeryville in Montgomery County. “But that hasn’t been the case. I haven’t seen really any effect on my business. ... We may have had a month or two of quiet, but that picked right back up.”

Right away, she and her agents found that home buyers weren’t afraid to spend their money.

The housing markets in Philadelphia and the suburbs had different reactions to the first months of the coronavirus pandemic.

While home sales in the city dropped from the first quarter to the second because the pandemic delayed the housing market’s usually busy spring season, sales activity increased in the suburbs by 9%, according to Drexel University economist Kevin Gillen’s analysis of data from Houwzer, the Philadelphia-based real estate brokerage. And while home prices rose in Philadelphia in the second quarter of the year, prices of homes in the suburbs dipped.

In the suburban counties, more than 1,000 more homes sold during April, May, and June than sold in the first three months of the year. In the city, roughly 2,200 fewer homes sold, according to Gillen’s report, released Thursday.

“The sharp difference between the market’s numbers for the city and its suburbs is both notable and relatively unusual,” Gillen wrote. Lower housing inventory in Philadelphia than in the suburbs is likely a key reason why prices are up while sales are down, he said.

The supply of homes for sale is low everywhere. But in Philadelphia, it would take roughly three months and 10 days for all listed homes to sell, given the current pace of sales. However, in the suburbs, it would take about five months for the supply of listed homes to sell.

“Although both the city and suburbs are in a seller’s market right now,” Gillen wrote in his report, “the city has generally been a consistent seller’s market for nearly five years, while the suburbs have frequently swung back and forth from a balanced market to a seller’s market during this same time period.”

Median sales prices across the region are up from a year ago, but mainly because more higher-end homes sold during the early months of the pandemic, and because the housing market’s busy season shifted.

Accounting for those factors, and differences in home characteristics, Philadelphia’s prices rose almost 9% from a year ago, while suburban house prices were down nearly 7%.

Compared with the period of April to June of last year, house prices this year dropped the most in Delaware, Gloucester, and Camden Counties. Prices fell 7.7% in the Pennsylvania county, while prices dropped by about 6% in the New Jersey counties.

Charles V. Insalaco, a licensed real estate agent and president of the Builders League of South Jersey, said he’s seen robust sales in his region despite the pandemic.

Over the last decade or more, people have been migrating from the suburbs to the cities, he said, but some of that trend is reversing as city residents seek more space, and millennials, the largest segment of the home-buying population, look for homes outside the city as they start families.

Buyers “are realizing everything that South Jersey has to offer,” including open spaces, quick public transit commutes to Philadelphia, proximity to the Shore, and towns that offer the walkability of a city, he said.

In the Pennsylvania collar counties, Gov. Tom Wolf’s shutdown of in-person real estate activity created pent-up demand, so buyers and sellers who were ready for sales raced out of the gate once Wolf allowed the industry to resume in mid-May, said Jamie Ridge, president of the Suburban Realtors Alliance.