The home Azam Khan sold on Fairbank Road in Northwest Baltimore last month strikes the real estate agent as a prime example of market shift. It changed hands for about $25,000 more than each of the similar Cape Cods that sold on the street last year — and it's smaller to boot.

In a growing number of Baltimore-area neighborhoods, home prices have stopped their years-long march downward. Some areas have stabilized. Some actually are heading up.

"The traditionally stronger neighborhoods are definitely on the rise," said Khan, who represented the seller of the three-bedroom, $312,000 home on Fairbank Road in Mount Washington. "The buyers are out there, definitely, and the sellers are now more willing to sell because they think they can get the prices they couldn't have gotten a year ago or two years ago."

Average sale prices remained flat or rose in more than half of the Baltimore region during the first six months of the year, compared with 2011's first half, according to a Baltimore Sun analysis of data from Rockville-based RealEstate Business Intelligence. By contrast, just a quarter of Baltimore-area communities avoided declines in average prices during the first half of last year.

It's the latest evidence that the housing bust is over. Some buyers are even getting into bidding wars for the choicest deals.

But for owners who bought during the housing bubble in the middle part of the last decade, there's still a long way to go.

Tens of thousands of local homeowners are underwater on their mortgages after earlier price declines, and it could be many years before they all resurface. Home values in the Baltimore metro area are down 24 percent since peaking six years ago, according to Fiserv, a financial services technology company that tracks repeat sales of homes.

"We think that prices are bottoming right about now," said David Stiff, chief economist at Fiserv.

He expects prices in the Baltimore area will rise modestly later this year and jump 7 percent between early next year and early 2014. Mortgage rates near record lows help fuel demand, but the main pressure pushing prices is fewer homes for sale — supply dropped as demand picked up.

It would take 61/2 months to sell everything on the market at the pace set this year. That's the lowest figure for the region since the first half of 2007, so early in the financial crisis that it didn't seem like a crisis at all.

Many owners underwater on their loans might like to sell, but they can't unless they can cover the difference or persuade their lender to take a loss. Stiff speculates that others who could sell are waiting for larger price increases.

The biggest threat to the price recovery may be the volatile foreclosure market. The number of bank-owned homes for sale plummeted across the region during the first half of the year, ranging from a 20 percent drop in Howard County to 44 percent in Harford County. For buyers, that has meant fewer low-priced options; for sellers, less competition.

The drop in bank-owned homes for sale came after mortgage servicers — buffeted by reports nationwide of shoddy and illegal foreclosure practices — hit the brakes on new cases and auctions.

But that slowdown seems to be over. The rate of new foreclosure cases was higher in Maryland than in any other state nationwide during the spring, according to the Mortgage Bankers Association.

Foreclosures could hit the market in larger numbers later this year, depending on how fast servicers move and how many homeowners are able to negotiate a loan modification or other alternative.

David McIlvaine Sr., an Ellicott City real estate agent who specializes in foreclosures, said he's been hearing from banks for many months that an uptick is imminent.

At any one time in late 2008 and 2009, when the housing bust was in full swing, the Keller Williams Select Realtors agent was handling 35 to 50 bank-owned homes. Now? Four — three of which drew multiple offers from buyers.

Foreclosures typically are the lowest-priced homes on the market. With fewer in the mix, average prices have soared in some Baltimore-area neighborhoods — far beyond any increase that individual homeowners enjoyed.

About three of every 10 ZIP codes in the Baltimore region posted double-digit price gains on average in the first half of this year. Baltimore's 21217 ZIP, which includes the neighborhoods of Reservoir Hill and Druid Heights, zoomed up more than 50 percent — to $93,000.