Homebuilder Lennar Corp <len.n> posted its first quarterly profit in almost three years, helped mainly by a tax benefit, and shares rose 6 percent in premarket trading.

The company, one of the five largest in the United States, reported earnings of $35.6 million, or 19 cents per share, for the fourth quarter ended November 30, compared with a loss of $811 million, or $5.12 per share, a year ago. Revenue fell 29 percent to $913.7 million. It last made a quarterly profit in the first quarter of 2007.

Miami-based Lennar's results included a tax benefit of $1.34 per share related to a federal tax provision that allows companies to apply losses to prior income. They also contained 89 cents per share in charges on land that has lost value.

Wall Street expected a loss of 48 cents a share, before special items, on revenue of $862.7 million, according to Thomson Reuters I/B/E/S. Thomson Reuters could not immediately confirm whether the results compared directly with estimates.

Lennar's results reflect a summer and fall during which homebuilders enjoyed a respite from the housing slump. Emboldened by a federal tax credit, historically low interest rates and lower home prices, buyers plunged into the market, enabling several builders, including Lennar, to post order increases. Lennar's orders increased by 3 percent, its first year-over-year increase since the first quarter of 2006.

Lennar's shares were up about 6 percent to $14.50 in premarket trading.

(Reporting by Helen Chernikoff and Bijoy Koyitty, editing by Dave Zimmerman)