NEW YORK (AP) -- U.S. stocks closed mixed Thursday as technology companies took their worst loss in six weeks, but energy companies rose with oil prices. A four-day winning streak for the S&P 500 index ended.
Energy companies rallied as the price of U.S. crude oil rose almost 2 percent. Smaller companies fell. Like technology companies, they've done far better than the rest of the market in the last few weeks. Some stocks that have struggled lately, including utilities, finished with gains.
Household goods makers also broke from their recent losses to finish higher. J.M. Smucker dropped after issuing a weak quarterly report and a disappointing forecast for the year. Bond prices climbed and yields dipped.
Quincy Krosby, the chief market strategist at Prudential Financial, said investors were playing it safe as they wait for leaders of the Group of Seven to meet Friday and Saturday, and for European Central Bank and Federal Reserve meetings next week.
"This G-7 meeting does not follow the historical template," she said. "The market is concerned about tariffs, negative trade dialogue coming from that meeting."
Still, Krosby said it's a good sign that investors were willing to take some of their winnings from the technology sector and put it into other parts of the market.
The S&P 500 index lost 1.98 points, or 0.1 percent, to 2,770.37. The Dow Jones industrial average picked up 95.02 points, or 0.4 percent, to 25,241.41, helped by big gains for McDonald's and Chevron.
The Nasdaq composite slumped 54.17 points, or 0.7 percent, to 7,635.07. The Russell 2000 index of small-company stocks slid 8.17 points, or 0.5 percent, to 1,667.77. Both of those indexes set all-time highs the last few days.
More stocks rose than fell on the New York Stock Exchange.
Benchmark U.S. crude rose 1.9 percent to $65.95 per barrel in New York. Brent crude, used to price international oils, gained 2.6 percent to $77.32 per barrel in London.
Chevron jumped 2.9 percent to $126.96 and Exxon Mobil rose 1 percent to $82.88.
Commerce Secretary Wilbur Ross said the U.S. government has reached a deal with Chinese telecommunications giant ZTE that includes a $1 billion fine, monitoring and leadership changes. ZTE has already paid about $1 billion for selling equipment to North Korea and Iran in violation of U.S. sanctions. In April the department blocked ZTE from importing any U.S. components for seven years, which threatened to put the company out of business.
The Wall Street Journal said that with the ZTE matter settled, China's government will likely approve a deal for Qualcomm to buy NXP Semiconductors. Qualcomm added 1.3 percent to $60.64 and NXP rose 4.8 percent to $120.07.
Technology stocks have fared far better than the rest of the market for more than a year, but they broke from that pattern Thursday. Facebook lost 1.7 percent to $188.18 and Microsoft fell 1.6 percent to $100.88. Chipmaker Lam Research shed 5.4 percent to $188.83.
Smucker's profit and sales fell short of analyst estimates, as did the company's forecasts for the new fiscal year. The maker of jams, jellies and other foods said it is facing difficulties including higher raw materials and freight costs and rising interest rates. The stock lost 5.4 percent to $100.80.
Allergan jumped 5.1 percent to $163.27 after Bloomberg News reported that investor Carl Icahn bought a small stake in the Botox maker. Bloomberg had no details on Icahn's plans, but he could join other activist investors who are pushing the company to make bigger changes.
At the end of May the company finished a strategic review and said it could sell its infectious disease and women's health businesses. But on Tuesday, Senator Investment Group and Appaloosa sent Allergan a letter saying they were "underwhelmed," and they suggested splitting Allergan's CEO and chairman roles and making changes to its board. Allergan stock is down 28 percent over the last 12 months.
The dollar fell to 109.60 yen from 110.19 yen. The euro rose to $1.1813 from $1.1768 after a European Central Bank board member said policymakers will discuss ending the bank's bond-purchasing stimulus program next week.
The Federal Reserve, meanwhile, is expected to raise interest rates on Wednesday. That would be the second increase in rates this year, and the Fed has said it expects to raise rates three times in 2018. But investors are looking for clues the Fed is planning a fourth increase.
Bond prices rose. The yield on the 10-year Treasury note fell to 2.92 percent from 2.97 percent.
In other energy trading, wholesale gasoline rose 2.2 percent to $2.11 a gallon. Heating oil jumped 2.5 percent to $2.18 a gallon. Natural gas climbed 1.2 percent to $2.93 per 1,000 cubic feet.
Gold rose 0.1 percent to $1,303 an ounce. Silver added 0.7 percent to $16.82 an ounce. Copper gained 0.4 percent to $3.28 a pound.
Germany's DAX lost 0.1 percent and the CAC 40 in France slid 0.2 percent. Britain's FTSE 100 slipped 0.1 percent after London's stock exchange opened one hour late because of a technical problem.
Japan's Nikkei 225 jumped 0.9 percent while the Kospi in South Korea finished up 0.7 percent and Hong Kong's Hang Seng index advanced 0.8 percent.