RED BANK, N.J. ( TheStreet) -- Shares of Hovnanian ( HOV), the homebuilder, rose 3.3% in after-hours trading Tuesday after posting a first-quarter profit because of a large tax gain.

Hovnanian said first-quarter earnings were $236.2 million, or $2.97 a share, a swing from a year-earlier loss of $178.4 million, or $2.29 a share. The latest quarter included a federal income tax benefit of $291.3 million.

Revenue in the quarter was $319.6 million, down from $373.8 million in the same quarter a year earlier.

Hovnanian said deliveries in the first quarter were 1,091 homes, a 10% decrease from the year-earlier first quarter.

Hovnanian said home buying patterns for the first quarter were seasonally typical.

"Traffic and net contracts dropped off around the Thanksgiving holiday, and we began to see a pickup in traffic and net contracts during the last half of January and into February," the homebuilder said.

Hovnanian shares ended Tuesday at $3.97, but rose 13 cents to $4.10 in after-hours trading.

-- Reported by Joseph Woelfel in New York.

Follow on Twitter and become a fan on Facebook.