This April 27, 2020, file photo shows a sale pending sign on a home in Mount Lebanon, Pa. Credit: Gene J Puskar / AP

SILVER SPRING, Md. —Spurred by ultra-low mortgage rates, home buyers rushed last month to snap up a limited supply of existing houses, causing the pace of purchases to jump by a record-high 24.7 percent.

The July surge in home sales reported Friday by the National Association of Realtors marked the second straight month of accelerating purchases. The back-to-back increases have helped stabilize the home buying market, which all but froze early this spring when the viral pandemic erupted across the United States.

With July’s increase, to a seasonally adjusted annual rate of 5.86 million, purchases of existing homes are now up 8.7 percent from a year ago. Near record-low mortgage rates have made home buying more affordable for buyers, and many are acting to capitalize on those loans. The average rate on a 30-year fixed rate mortgage is now 2.99 percent, the mortgage buyer Freddie Mac reported Thursday. A year ago, it averaged 3.55 percent.

In a few of the country’s most expensive housing markets — notably New York and San Francisco — real estate professionals say they are seeing more people leaving high-rent city apartments to buy homes in outer suburbs. The loss of urban amenities and fear of the risk of infection may be contributing to that trend.

But nationally, an analysis by Zillow has found that urban and suburban areas are showing similar strength. Many suburbs are becoming hot sellers’ markets, Zillow said, but so have many urban areas.

“There is some localized evidence of a softer urban market, particularly in the highest-priced markets, San Francisco and Manhattan, and an eye-catching divergence in sale prices, but no evidence of a widespread flight to suburban pastures, said Jeff Tucker, an economist at Zillow.

“The primary issue in much of the country,” Tucker said, “is the inventory drought, both urban and suburban, that’s failing to meet the surprisingly robust demand from buyers eager to lock in record-low mortgage rates.”

In the midst of the pandemic-inducted recession, the U.S. housing market has emerged as one of the few resilient sectors of the economy. An unusually sparse supply of homes around the country is both helping fuel demand and keeping sales lower than they might otherwise be. The supply of homes for sale in July was down 2.6 percent from June and off 21 percent from a year ago. At the current sales pace, there is a 3.1-month supply of houses — down from 3.9 months in June and the 4.2 months a year ago.

The result is that homes put up for sale are vanishing quickly. Homes were on the market for an average of 22 days in July, down by two days from June. And they are disappearing seven days faster than in the same month last year. The NAR said more than two-thirds of homes sold in July had been on the market for less than a month.

The lack of homes available for purchase is sending prices rising. The median price for a home has cracked the $300,000 mark for the first time on record, settling at $304,100. That up a sharp 8.5 percent from July 2019.

“With only 3.1 months of existing supply on the market, even with the recent pickup in the pace of home building, the lack of inventory is going to continue to be a hurdle by limiting some prospective buyers’ choices and weakening their purchasing power,” said Mike Fratantoni, chief economist at the Mortgage Bankers Association.

Builders have been responding to rising buyer demand. The construction of new homes surged 22.6 percent in July, and housing starts have now risen for three straight months after plunging in March and April.

In its report Friday, the NAR said that sales exploded in every region in the country in July, led by the Northeast and West, where purchases jumped more than 30 percent . The Midwest was close behind, with sales up 27.5 percent. Purchase rose 19.4 percent in the South.

The surge in home sales, or closings, jibe with a report on pending home sales from May, when signed contracts jumped a record 44.3 percent. That report is a barometer of finalized purchases over the next two months — in this case, the record setting months of June and July.

In the first few months after the pandemic hit — just when the traditional spring home buying season would have begun — sales of both existing and new homes tumbled with communities locked down to prevent the spread of the coronavirus. But as areas have lifted restrictions, home sales have accelerated.