Soaring prices are hitting the vacation home market, as a growing number of Americans now choose to rent rather than buy their beach and mountain homes.

Sales of vacation homes slumped nearly 22 percent in 2016 to the lowest level in three years, even as overall home sales hit their highest level in a decade, according to a new report from the National Association of Realtors (NAR). Vacation home buyers also were more likely to take out a mortgage to help offset higher costs.

Several markets in the South and West — the two most popular destinations for vacation home buyers — saw strong sales gains for years as job growth came back online after the financial crisis. But vacation home sales tanked last year as demand outstripped the supply of available homes, said Lawrence Yun, chief economist for the NAR.

"With fewer bargain-priced properties to choose from and a growing number of traditional buyers, finding a home for vacation purposes became more difficult and less affordable last year," he said.

It was the second straight year of falling sales for the vacation sales sector, which is now down 36 percent from its latest peak in 2014. Yun points to volatility in the financial markets in late 2015, which continued into the presidential election in 2016, as causing more affluent buyers to curtail purchases.

Tight supply of vacation homes for sale was behind the jump in prices, as it is in the overall housing market. The median price of a vacation home sold in 2016 was $200,000, up 4.2 percent compared to 2015 and the highest median price since 2006.

In the tony Hamptons, a luxury vacation destination on Long Island, N.Y., sales fell an even steeper 14.5 percent annually at the end of 2016, according to Miller Samuel Real Estate Appraisers, which compiles reports for Douglas Elliman, a real estate brokerage. Prices also fell, however, down 7.2 percent.

"In the Hamptons, we saw a reset in sales," said Jonathan Miller, president and CEO of Miller Samuel. "Prior to that, in 2014-5, we had an atypical period of second home activity, an unusually high point. Part of it was because '14 and '15, for the second home market, was a release of pent-up demand after the financial crisis."

That second home market boom was not sustainable. Miller also points to uncertainty around the election last year. He expects to see something of a Trump bump in sales for the first quarter of this year, which would mimic the rise in the stock market and overall consumer optimism following the election. Sales in the primary market in Manhattan jumped following the election.

While vacation sales may have suffered, vacation rentals saw a bump last year. Investors increased their purchases and more of those surveyed by the NAR said they were renting to shorter-term vacationers. And more vacation homeowners said they were planning to rent their homes out this year compared to last year.