An existing single family home which is up for sale is pictured in Burbank, California December 15, 2011. REUTERS/Fred Prouser

WASHINGTON (Reuters) - U.S. home resales unexpectedly rose in May to the third highest monthly level in a decade and a chronic inventory shortage pushed the median home price to an all-time high.

The National Association of Realtors said on Wednesday existing home sales increased 1.1 percent to a seasonally adjusted rate of 5.62 million units last month.

Economists polled by Reuters had forecast sales declining 0.5 percent to a rate of 5.55 million units. Sales were up 2.7 percent from May 2016.

The number of homes on the market rose 2.1 percent, but supply was down 8.4 percent from a year ago. Housing inventory has dropped for 24 straight months on a year-on-year basis.

The median house price increased to an all-time high of $252,800, a 5.8 percent jump from one year ago, reflecting the dearth of properties on the market.

“We have a housing shortage, we may even use the term housing crisis in some markets,” NAR chief economist Lawrence Yun said.

House price gains have also been helped by an unemployment rate that is at a 16-year low. Mortgage rates also remain favorable by historical standards.

At the current sales rate, it would take 4.2 months to clear inventory, down from 4.7 months one year ago. The median number of days homes were on the market in May was 27, the shortest time frame since NAR began tracking data in 2011.

Despite robust demand for housing, the sector has shown some recent signs of strain. U.S. homebuilding fell for a third straight month in May to its lowest level in eight months, the U.S. Commerce Department reported last week.