KB Home posted a lower fourth-quarter profit on reduced margins, sending shares down as much as 8.5 percent, but said orders for new homes surged and home prices rose in another sign that the beleaguered housing market was gaining a foothold.

The fifth-largest U.S. homebuilder, which competes with Toll Brothers , said orders jumped 38 percent, with the greatest increases in higher-priced West Coast markets.

Orders are a key indicator for builders who do not book revenue until they close on a house.

It is a particularly tough time for builders of new homes, with a massive overhang of used houses and foreclosed homes in the market, resulting in lower pricing power.

In addition to delivering more homes at higher prices, we expect that operating margins will improve in 2012 on a year-over-year basis starting in the first quarter and will be positive for the year as we execute our build-to-order model, Chief Executive Jeffrey Mezger told analysts on a conference call.

The company's shares were down 6.8 percent at $7.21 on Wednesday afternoon, off an earlier low at $7.08.

Evidence is mounting that a recovery is building, though the improvement has been erratic.

U.S. housing starts and permits to build jumped to a 1 1/2-year high in November, the Commerce Department reported on Tuesday. Homebuilders' shares shot up as a result, with KB Homes jumping 10 percent on Tuesday.

The National Association of Realtors on Wednesday said sales of existing homes rose 4 percent in November, though from a more depressed level than previously reported, supporting the view of a gradual emergence from the trough.

The number of home foreclosures, meanwhile, jumped by more than 21 percent in the third quarter from the prior quarter, but about 12 percent below the pace a year ago.

In the fourth quarter, we reported net profits, continued to increase our net orders, and built our backlog to the highest year-end level since 2008, said Mezger.

The company expects its average home selling price to rise in 2012, and plans to heighten its concentration in our most desirable markets, particularly on the West Coast where profits are typically higher, he said.

It delivered 1,995 homes at an average selling price of $238,400 in the quarter, compared with 1,918 homes at an average $232,500 in the year-ago period.

KB Home said housing gross margin was 14.7 percent, down from 19.1 percent last year. The drop reflected fewer homes delivered from higher-margin communities, partly offset by improved operating leverage from an overall increase in the number of homes delivered, the company said.

Many potential home buyers remain reticent to lock in to such a major financial commitment, even though mortgage rates hover near record lows, as unemployment remains high and consumer confidence is low.

Demand for new home loans fell in the latest week even as mortgage rates declined.

Fourth-quarter net income fell to $13.9 million, or 18 cents a share, from $17.4 million, or 23 cents a share, a year ago.

Total revenue at the Los Angeles-based company, which was founded in 1957, rose 6 percent to $479.9 million.

(Reporting by Lynn Adler in New York and Megha Mandavia in Bangalore; Editing by Maureen Bavdek and Matthew Lewis)