Updated from 11:17 a.m. EST

Homebuilder shares slid Tuesday after Beazer Homes ( BZH) recorded a hefty loss for its first quarter and offered a bleak forecast for the rest of the year.

Elsewhere, the National Association of Realtors said sales of existing homes were weaker than expected in December, though the inventory of homes on the market fell.

Atlanta-based Beazer said Thursday that it recorded a loss of $59 million, or $1.54 a share, for its fiscal first quarter, compared with net income of $89.9 million, or $2 a share, a year earlier. Inventory impairments and land option write-offs totaled $120 million, steeper than some analysts' expectations.

Excluding the charges, earnings were 41 cents a share. Analysts expected profit of 26 cents a share for the December quarter, according to Thomson Financial.

Beazer's revenue fell to $806.4 million from $1.11 billion a year earlier. New orders tumbled 54% to 1,779 homes.

"The current market environment continues to be characterized by weak demand, with heavy discounting required to drive meaningful sales volume," the company said.

The company gave 2007 EPS guidance of $1.25 to $1.50, which excludes the impact of any further inventory impairments and abandonment of land option contracts. The guidance was well below analysts' average forecast of $2.47 a share.

"At this point, we have yet to see any meaningful evidence of a sustainable recovery in the housing market, although we would expect to gain a better read on the market as the traditional spring selling season gets under way," Beazer CEO Ian McCarthy said in a statement.

In a research note, A.G. Edwards analyst Greg Gieber said Beazer faces the risk of posting a loss for fiscal 2007 because of likely land impairment charges that aren't included in the company's current guidance.

"It's not over. It may still be a good ways from being over," wrote Gieber, who rates Beazer a sell.

Shares of Beazer recently were down $2.46, or 5.2%, to $44.55. Meanwhile, KB Home ( KBH) was down $1.92, or 3.6%, to $51.89; Toll Brothers ( TOL) fell $1.41, or 4.1%, to $32.78; and Hovnanian ( HOV) was lower by $1.36, or 4.1%, to $31.75.

Ryland, which reported earnings late Wednesday and gave a relatively optimistic guidance, was down $2.92, or 5.2%, to $53.05.

In the first quarter, Beazer's gross margin sank to 3% in the quarter from 25% a year earlier, because of the land impairment charges and the increased use of incentives to sell homes.

The company's cancellation rate jumped to 43% from 26% in the year-earlier period. Cancellations were down, however, from a rate of 57% in the prior quarter.

Separately, the NAR said existing-home sales fell 0.8% in December to an annual rate of 6.22 million units. The rate was below economists' expectation of 6.3 million units.

Total housing inventory fell 7.9% to 3.51 million homes for sale, which represents a 6.8-month supply of homes at the current sales pace. That was down from the 7.3-month level in November.

The national median price of a home was $222,000 in December, unchanged from a year earlier.