Stock indexes were mixed Wednesday as energy companies skidded along with oil prices, but technology stocks rose and reversed a portion of their recent losses.

After O’Reilly Automotive reported weak sales growth in the second quarter, the three biggest losers on the Standard & Poor’s 500 index were all auto parts companies. Carmakers slumped, too.

advertisement | advertise on newsday

An eight-day rally in U.S. crude oil prices ended with a thud, and energy companies took sharp losses. Retailers and small, domestically focused companies also struggled.

Technology companies bucked the trend and finished higher. Banks and industrial and health care companies also rose on another quiet day of trading after the Independence Day holiday.

With earnings reports from banks next week, Doug Burtnick, deputy head of North American equities for Aberdeen Asset Management, said Wall Street will get a clearer view of how much money banks are lending.

The Standard & Poor’s 500 index added 0.15 percent to end at 2,432.54. The Dow Jones industrial average inched down 1.10 points to 21,478.17. Nasdaq composite rose 0.67 percent to 6,150.86.

Benchmark U.S. crude dropped $1.94 to $45.13 a barrel in New York. — AP