By Akane Otani
NEW YORK (Reuters) - U.S. stocks ended mostly lower on Tuesday, retreating from records set the previous month, as falling crude oil prices dragged energy shares down and offset strong manufacturing data.
The S&P energy index <.SPNY> fell 1.3 percent as the prospect of slowing demand for oil in China and Europe and concerns about an oversupply of oil brought Brent crude oil futures to their lowest price since May 31, 2013. Peabody Energy Corp
The strengthening dollar, which rose to its highest this year against the yen, was also seen as weighing on oil prices.
"This isn't a cause of alarm for the market. We're just seeing energy pulling back a bit after a very big market rally and taking a bit of time to digest those gains," said Adam Sarhan, chief executive of Sarhan Capital in New York.
Despite the day's declines, energy shares have overall performed well, with the S&P 500 energy sector <.SPNY> outperforming the wider S&P index so far in 2014.
U.S. factory activity rose to its highest in nearly 3-1/2 years in August, and construction spending rebounded strongly in July.
Of the 30 stocks in the Dow industrials, Home Depot Inc
The Dow Jones industrial average <.DJI> fell 30.89 points, or 0.18 percent, to 17,067.56. The S&P 500 <.SPX> ended down 1.09 points, or 0.05 percent, at 2,002.28. The Nasdaq Composite <.IXIC> added 17.92 points, or 0.39 percent, to end at 4,598.19.
Digital Ally Inc
Electric carmaker Tesla Motors Inc
Merger activity continued to flourish. Discount retailer Dollar General Corp
About 5.2 billion shares traded on all U.S. platforms, according to BATS exchange data, compared with the five-day average of 4.4 billion.
(Reporting by Akane Otani; Editing by Chizu Nomiyama, Nick Zieminski and Steve Orlofsky)