Prices for U.S. homes rose at a new record pace in May, as Americans battled for homes amid a historic shortage.

The S&P CoreLogic Case-Shiller National Home Price Index soared 16.6 percent in the year that ended in May, the highest annual rate of price growth since the index began in 1987. That is a pick up in price gains from April’s 14.4 percent.

The 20-city home price index, which tracks prices in a narrower set of cities, soared 17 percent in May from a year, the most since August 2004.  That follows a 15 percent rise in April

The hottest markets were Phoenix (where prices surged 25.9 percent), San Diego (24.7 percent), and Seattle (23.4 percent). All 20 cities reported faster year-over-year growth in May than they did in April.

The U.S. housing market has been hot. Many Americans, tired of being cooped up at home during the pandemic, have traded in apartments and small homes in city for bigger houses in the suburbs. The Federal Reserve’s easy money policies have also kept mortgage rates near historic lows, pushing up demand for housing.

The supply of houses for sale has been limited, partly because many Americans are reluctant to put their properties on the market and allow would-be buyers to troop through their homes.

But rising prices have pushed many would-be buyers out of the market. The Commerce Department reported Monday that sales of new homes fell in June for the third straight month, sliding to the lowest level in more than a year. Last week, the National Association of Realtors reported that sales of previously occupied homes rose in June, snapping a four-month losing streak.