By Caroline Valetkevitch

NEW YORK (Reuters) – U.S. stocks fell in afternoon trading on Tuesday, reversing earlier gains, led by a drop in materials and energy shares.

The S&P 500 around midday broke below its 50-day moving average, triggering further selling. The major indexes had all been up more than 1 percent earlier.

Shares of homebuilders fell broadly after KB Home forecast a drop in gross margins for the first quarter. Homebuilder stocks had been up earlier in the session, but KB Home was last down 13.7 percent, while a housing index <.HGX> was down 0.9 percent.

Among materials shares, Alcoa Inc shares were down 2 percent, also having reversed earlier gains. The company late Monday reported a higher-than-expected quarterly profit due to automotive demand, higher aluminum prices and lower energy costs. The S&P materials index <.SPLRCMA> was down 1.6 percent.

At 1:54 p.m., the Dow Jones industrial average <.DJI> fell 78.6 points, or 0.45 percent, to 17,562.24, the S&P 500 <.SPX> lost 12.29 points, or 0.61 percent, to 2,015.97 and the Nasdaq Composite <.IXIC> dropped 18.58 points, or 0.4 percent, to 4,646.13.

Declining issues outnumbered advancing ones on the NYSE by 1,960 to 1,086, for a 1.80-to-1 ratio; on the Nasdaq, 1,635 issues fell and 1,037 advanced for a 1.58-to-1 ratio favoring decliners.

The S&P energy index <.SPNY> was down 1.2 percent. Brent and U.S. crude touched their lowest levels in almost six years as a big OPEC producer stood by the group’s decision not to cut output.

Goodyear Tire & Rubber stumbled 6.8 percent and was the S&P 500’s biggest percentage decliner after the estimated full-year operating income growth “slightly below” its forecast of 10 to 15 percent.

(Additional reporting by Chuck Mikolajczak; Editing by Lisa Von Ahn and Nick Zieminski)