(Adds details, analyst comments, homebuilders stocks)
* Existing home sales rise 4.9 percent in May
* Housing inventory increases 6.0 percent from year ago
* Median home price gain smallest since 2012
By Lucia Mutikani
WASHINGTON, June 23 (Reuters) - U.S. home resales rose more than expected in May and the stock of properties for sale was the highest in more than 1-1/2 years, suggesting the housing sector was pulling out of a recent slump.
The National Association of Realtors said on Monday existing home sales increased 4.9 percent to an annual rate of 4.89 million units. May's increase was the largest since August 2011.
"The housing market has quite some ways to go to recover from its recent sluggishness, but positive momentum ... suggests that housing has begun to show signs of life," said Gennadiy Goldberg, an economist at TD Securities in New York.
Economists had forecast sales rising only 2.2 percent to a 4.73 million-unit pace. Sales, which rose in all four regions, were driven by the single-family home segment, the largest portion of the market.
The housing recovery stalled in the second half of 2013 as interest rates increased and prices surged against the backdrop of a dwindling supply of properties available for sale. Mortgage rates have leveled off after their climb, however, and a rise in inventory is now providing potential buyers with more choices.
Even though May marked a second straight month in which sales rose, they were still off 5.0 percent from a year ago and 9.1 percent from a peak of 5.38 million units hit in July.
The increase in sales will be welcomed by the Federal Reserve, which is watching housing closely as it contemplates the future course of monetary policy. Fed Chair Janet Yellen had warned a prolonged slump could undermine the economy.
The relatively bullish report offered further evidence the economy has regained strength after a weak first quarter. Rising sales and a steady pace of groundbreaking should lead to a modest rebound in residential investment after two straight quarters of decline.
Housing shares rose on the data, outperforming the broader market. KB Home rose 1.6 percent, while Toll Brothers rose 1.3 percent. PulteGroup gained 1.6 percent.
A separate report showed factory activity expanding strongly in June. Financial data firm Markit' preliminary manufacturing purchasing managers index rose to 57.5, its highest level since May 2010, from 56.4 in May.
A reading above 50 signals expansion in economic activity.
While home sales are rising, pockets of weakness remain.
First-time buyers, a necessary ingredient for a strong housing market, continue to hug the sidelines.
Last month, first-time buyers accounted for only 27 percent of transactions, near the lowest level since the Realtors group started tracking the series. A market share of 40 percent to 45 percent is considered by economists and real estate professionals as ideal.
Investors, who had propped up the market are retreating fast, and accounted for only 16 percent of transactions in May.
The inventory of unsold homes on the market increased 6.0 percent from a year-ago to 2.28 million in May, the highest level since August 2012.
The improving supply is helping to temper price increases. The median home price increased 5.1 percent from a year ago, the smallest gain since March 2012.
"This is a good sign for the longer-term health of the housing market," said John Ryding, chief economist at RDQ Economics in New York. "We do not expect housing to be a big driver of growth this year but these data at least suggest that it may not be a drag either."
Even so, at May's sales pace, the month's supply of existing homes decreased to 5.6 months from 5.7 months in April. Six months' supply is normally considered a healthy balance between supply and demand. (Reporting Lucia Mutikani; Editing by Andrea Ricci)