NEW YORK (Reuters) - A steep drop in oil prices dragged energy shares lower and kept the Dow and S&P 500 in check on Wednesday, while the Nasdaq was buoyed by gains in tech stocks.

Crude prices CLc1LCOc1 settled about 4 percent lower, ending their longest bull run in more than five years, hurt by a stronger dollar .DXY and concerns about rising OPEC exports.

“The U.S. is the swing producer and the major capitalist producer as well,” said Tim Ghriskey, chief investment officer of Solaris Asset Management in New York.

“So the government can’t dictate to the domestic industry whether to pump or not pump - they are going to keep pumping as long as it is profitable for them.”

Shares of Exxon XOM.N and Chevron CVX.N fell by more than 1.5 percent and were among the biggest drags on the Dow and S&P. The S&P energy index .SPNY lost 2 percent and was the worst performing out of the 11 major S&P sectors.

Recent tepid economic data and an inflation rate below the Federal Reserve’s 2 percent target may have a bearing on the U.S. central bank’s plans for interest rate hikes.

New orders for U.S.-made goods fell more than expected in May, data showed on Wednesday, but capital equipment orders were slightly stronger than previously reported, suggesting manufacturing remains on a path of moderate growth.

Slideshow ( 6 images )

Fed policymakers were increasingly split on the outlook for inflation and how it will affect the future pace of rate increases, according to minutes of the Fed’s latest policy meeting on June 13-14.

The minutes revealed a few officials viewed equity prices as high when compared to standard valuation measures, even though earnings growth had been robust.

The Dow Jones Industrial Average .DJI fell 1.1 points, or 0.01 percent, to close at 21,478.17, the S&P 500 .SPX gained 3.53 points, or 0.15 percent, to 2,432.54 and the Nasdaq Composite .IXIC added 40.80 points, or 0.67 percent, to 6,150.86.

The tech sector's .SPLRCT 1 percent rise led the S&P 500 gainers, with Advanced Micro Devices AMD.O, Micron MU.O and Nvidia NVDA.O among the best performers in the sector. The PHLX semiconductor index .SOX jumped 2.1 percent.

Technology shares have been volatile in recent weeks as the sector’s strong run this year raised concerns about their valuation.

The tech sector index is up nearly 17 percent this year.

Slideshow ( 6 images )

O'Reilly Automotive ORLY.O plunged 18.9 percent to a near three-year low after its second-quarter same-store sales widely missed its own estimates.

That move dragged down other auto-parts retailers, with Autozone AZO.N down 9.6 percent and Advance Auto Parts AAP.N down 11.15 percent.

Declining issues outnumbered advancing ones on the NYSE by a 1.60-to-1 ratio; on Nasdaq, a 1.29-to-1 ratio favored decliners.

About 6.52 billion shares changed hands in U.S. exchanges, below the 7.19 billion daily average over the last 20 sessions.