NEW YORK (Reuters) - The S&P and Nasdaq fell on Thursday as the technology sector snapped a rally while investors turned to safer bets as they kept an eye on global trade tensions and waited for U.S. and European central bank meetings.

U.S. Treasury prices rose on Thursday, as trade disputes between the United States and its major trade partners were in focus ahead of the Group of Seven (G7) summit.

Investors worried about a showdown at the meeting, set for Friday and Saturday in Charlevoix, Quebec after U.S. President Donald Trump signaled that he would stick to his tough stance on trade after imposing tariffs on steel and aluminum imports from Canada, Mexico and the European Union last week.

“There’s caution associated with the G7 meeting which historically is neutral for the market. This G7 meeting doesn’t fit the template particularly with regard to trade,” said Quincy Krosby, chief market strategist at Prudential Financial.

Canada and Mexico have retaliated against a range of U.S. exports and the EU has promised to do so as well.

“Equally there’s a European Central Bank meeting and a Federal Reserve meeting next week. Both are paramount for the market’s direction,” said Krosby.

The Fed is widely expected to announce an interest rate hike on Wednesday but investors are looking for clues on whether the U.S. central bank will raise rates a fourth time in 2018.

A trader works on the floor of the New York Stock Exchange shortly after the opening bell in New York, U.S., June 4, 2018. REUTERS/Lucas Jackson

The Dow Jones Industrial Average rose 95.02 points, or 0.38 percent, to 25,241.41, the S&P 500 lost 1.98 points, or 0.07 percent, to 2,770.37.

The Nasdaq Composite dropped 54.17 points, or 0.7 percent, to 7,635.07 after registering three straight closing record highs in the previous sessions.

“The Nasdaq has had an incredible run this week so it may be some profit-taking,” said Bill Callahan, investment strategist at Schroders in New York.

The S&P technology index fell 1.1 percent, led by heavyweights Microsoft Corp, ending 1.6 percent lower, and Facebook Inc, which fell 1.7 percent. The losses followed a six-day rally that had pushed the index to record levels.

The Dow was boosted on Thursday by a 4.4 percent jump in McDonald’s Corp shares after a report that the company was planning a new round of layoffs.

The S&P 500’s Energy index was the biggest gainer out of the benchmark’s 11 major sectors, with a 1.6 percent advance helped by rising oil prices. [O/R]

Brent crude was up almost 2 percent on concerns of a plunge in exports from Venezuela and worries OPEC may not raise production at its meeting this month.

Defensive sectors such as consumer staples, Utilities and telecommunications were also up on the day as investors looked for some safer bets in areas which have recently been out of favor due to rising rates.

Advancing issues outnumbered declining ones on the NYSE by a 1.14-to-1 ratio; on Nasdaq, a 1.26-to-1 ratio favored decliners.

The S&P 500 posted 52 new 52-week highs and seven new lows; the Nasdaq Composite recorded 223 new highs and 36 new lows.

Volume so far on U.S. exchanges was 7.25 billion shares, compared with the 6.64 billion average for the last 20 days.