WASHINGTON - Sales of previously owned U.S. homes in May posted the best monthly gain in nearly three years, providing hope that housing is beginning to regain momentum lost over the past year.

The National Association of Realtors says that sales of existing homes increased 4.9 percent last month to a seasonally adjusted annual rate of 4.89 million homes. The monthly gain was the fastest since August 2011, but even with the increase sales are still 5 percent below the pace in May 2013.

Sales have been dampened by last year's rise in mortgage rates from historic lows and various other factors including tight supplies and tougher lending standards.

The median price of a home sold in May was $213,400, up 5.1 percent from a year ago.