(Reuters) - The S&P 500 fell on Tuesday as chipmakers were dented by ratings downgrades and utilities declined ahead of an expected Federal Reserve interest rate hike, offsetting a boost from the energy sector.

S&P 500 financials .SPSY, including interest-rate-sensitive bank stocks .BKX, dipped 0.38 percent ahead of the expected rise in interest rates by the Fed on Wednesday. Utilities, which tend to be favored in low-rate environments because of their solid dividend payments, .SPLRCU slid 1.22 percent

The S&P 500 energy index .SPNY added 0.57 percent as Brent oil hit a four-year high, boosted by imminent U.S. sanctions on Iranian exports, and OPEC and Russia's reluctance to raise output.

U.S. consumer confidence unexpectedly rose in September, bringing it closer to levels last seen in 2000, the Conference Board said, underscoring strength in the labor market and the overall economy.

The data pushed the S&P 500 consumer discretionary index .SPLRCD up 0.59 percent.

“A lot of the noise around trade and anything else around politics really hasn’t suppressed consumer confidence nearly to the degree that the other factors have boosted it,” said Mike Dowdall, investment strategist for BMO Global Asset Management, in Chicago.

The Philadelphia semiconductor index .SOX dropped 1.70 percent, weighing on the S&P 500 technology index .SPLRCT, after brokerages Raymond James and KeyBanc cut their ratings on a number of chipmakers. Intel INTC.O fell 2.13 percent after Raymond James downgraded the stock.

Buoyed by strong economic growth and deep corporate tax cuts, the S&P 500 has gained 9 percent so far in 2018. But five of the S&P 500 sector indexes are down year to date, including the consumer staples index .SPLRCS, down 5.6 percent. Consumer staples .SPLRCS on Tuesday lost 0.73 percent. The other six are higher, led by the technology index's .SPLRCT 19 percent rally.

“There are different stories for different sectors, it’s a finicky little market,” said Dennis Dick, a proprietary trader at Bright Trading LLC. “If you’re a money manager, you have to be very careful about what you’re buying.”

The Dow Jones Industrial Average .DJI fell 0.26 percent to end at 26,492.21 points, and the S&P 500 .SPX lost 0.13 percent to 2,915.56.

The Nasdaq Composite .IXIC rose 0.18 percent to 8,007.47. Amazon.com Inc AMZN.O provided the greatest lift to the technology-heavy index, jumping 2.08 percent.

In extended trade, Nike Inc NKE.N fell 2.89 percent after it reported quarterly results.

CenturyLink CTL.N tumbled 8 percent after Chief Financial Officer Sunit Patel left the company in a surprise move to join T-Mobile US Inc TMUS.O to oversee its integration with Sprint S.N. T-Mobile rose 0.77 percent and Sprint added 0.31 percent.

Declining issues outnumbered advancing ones on the NYSE by a 1.20-to-1 ratio; on Nasdaq, a 1.00-to-1 ratio favored advancers.

The S&P 500 posted 31 new 52-week highs and 10 new lows; the Nasdaq Composite recorded 65 new highs and 54 new lows.

Volume on U.S. exchanges was 6.6 billion shares, just below the 6.7 billion average over the last 20 trading days.