LOS ANGELES (AP) — Sales of previously occupied homes rose in January as a surge in buyers with cash and others eager to avoid higher mortgage rates snapped up properties, leaving the number of available houses on the market at a record low.

Existing home sales rose 6.7% last month from December to a seasonally adjusted annual rate of 6.5 million, the National Association of Realtors said Friday. That’s more than the roughly 6.08 million sales that economists had been expecting, according to FactSet.

Sales slipped 2.3% from January 2021 as the median home price jumped 15.4% from last year at this time, to $350,300.

Those prices are being driven higher with so many potential buyers hunting for a shrinking number of properties still on the market. The number of homes for sale at the end of January totaled just 860,000 — the fewest since the NAR began tracking it in 1999, and there are few signs that pressure will let up soon.

The inventory of unsold homes fell 2.3% from December and 16.5% from a year ago. At the current sales pace, that amounts to a record low 1.6 months’ supply, the NAR said.

While it’s normal for fewer homes to go on sale in the months leading up to the annual spring homebuying season, the ultra-low level of properties on the market continues to give sellers a big edge on buyers.

The combination of rising home prices and a dearth of homes on the market has also given a leg up to investors and homebuyers who can afford to outbid other would-be buyers with cash. Some 27% of home sales last month were all-cash transactions, the NAR said. A year ago they made up only 19%.

Real estate investors accounted for 22% of transactions in January, up from 15% a year ago. First-time buyers, meanwhile, made up 27% of all homes sold last month.

On average, homes sold in 19 days of hitting the market last month. That’s not quite as fast as the summer, when 17 days was the norm. In a market that’s more evenly balanced between buyers and sellers, homes typically remain on the market 45 days.

Homebuilders have stepped up to put up more new homes in response to the red hot housing demand. Nearly 1.6 million housing units were started in 2021, a 15.6% increase over 2020, according to the Commerce Department. But many more homes need to be built. A recent analysis by Realtor.com found the shortage of new homes relative to new households has swelled to nearly 6 million homes.

Housing market demand looks to remain healthy this year, bolstered by ongoing demographic change as younger millennials and Gen-Zers come of age and look to become homeowners. But with housing in short supply since well before the pandemic, higher prices and rising interest rates will make it even harder for house hunters this spring to secure a new home.

Average long-term U.S. mortgage rates rose this week, approaching levels not seen since 2019. The average rate on a 30-year loan reached 3.92%, up from 3.69% the previous week, according to mortgage buyer Freddie Mac.

The last time the 30-year rate was higher was in May of 2019 when it reached 3.99%.

Historically low mortgage rates last year helped give would-be homeowners buying power as prices soared. Now rates are expected to rise as the Federal Reserve moves to fight inflation by raising its short-term interest rate and winding down its bond purchases that helped keep long-term interest rates low.

The rapid-fire sales occurring now could loose momentum just because prices are rising so fast and there are so few homes to choose from, said Nancy Vanden Houten, lead U.S. economist at Oxford Economics.

“Resilient demand and strong income gains will underpin the housing market, but limited supply and declining affordability from both higher prices and sharply higher mortgage rates will constrain the pace of sales,” Vanden Houten said.