The median U.S. home price rose to a new high of $363,300 in June as strong demand pushed home sales higher.

Existing-home sales rose 1.4% in June from the prior month to a seasonally adjusted annual rate of 5.86 million, the National Association of Realtors said Thursday. June sales rose 22.9% from a year earlier.

The median existing-home price rose 23.4% in June from a year earlier, setting a new record high, NAR said, extending steady price increases amid limited inventory.

Economists surveyed by The Wall Street Journal expected a 2.2% monthly increase in sales of previously owned homes, which make up most of the housing market.

The housing-market boom is easing slightly, as rising prices are prompting more homeowners to list their houses for sale. Homes sold in June received four offers on average, down from five offers the previous month, said Lawrence Yun, NAR’s chief economist.

But the number of homes for sale still remains far lower than normal, and robust demand due to ultralow mortgage-interest rates is expected to continue pushing home prices higher.

“Home sales continue to run at a pace above the rate seen before the pandemic,” Mr. Yun said.