* Exxon, Chevron boost S&P and Dow; tech weighs on Nasdaq
* Oil prices jump after OPEC agrees to modest hike in supply
* Red Hat slumps on disappointing revenue forecast
* Dow up 0.69 pct, S&P gains 0.40 pct, Nasdaq down 0.13 pct (Updates to early afternoon)
By Medha Singh
June 22 (Reuters) - U.S. stocks rose on Friday with the Dow Jones Industrial Average looking to snap its 8-day losing streak, powered by a surge in oil prices, but losses in technology stocks curbed some gains.
The benchmark Brent crude jumped $1.83 to $74.88 a barrel, following three days of losses, after OPEC agreed to modest crude output increases to compensate for losses in production at a time of rising global demand.
Exxon Mobil rose 2.4 percent and Chevron gained 2.7 percent, lending the biggest boost to the S&P 500 and the Dow. The S&P energy index was up 2.9 percent, eyeing its best day in nearly a month.
A recent rally in oil prices due to an OPEC decision to restrict supply in an effort to drain global inventories, has helped S&P energy be the best performing S&P sector in the last three months.
U.S. President Donald Trump, in his latest move, threatened to impose a 20 percent tariff on all European Union car imports, a month after the administration launched a probe into whether auto imports pose a threat to national security.
Harley-Davidson fell 2.6 percent. The U.S. bike maker has in the past warned of a "significant impact" on its sales if the European Union decides to increase duties on motorcycles in retaliation.
This adds to worries about the China-U.S. trade spat which escalated earlier this week after Trump threatened to impose tariffs on $200 billion of Chinese imports and Beijing vowed to retaliate.
"Caution is very important among investors when it comes to trade ... this choppy, erratic and volatile action on a day-to-day and intraday basis is going to be the norm till things settle down," said Andre Bakhos, managing director at New Vines Capital LLC in Bernardsville, New Jersey.
At 12:47 a.m. EDT the Dow Jones Industrial Average was up 168.33 points, or 0.69 percent, at 24,630.03, the S&P 500 was up 10.92 points, or 0.40 percent, at 2,760.68 and the Nasdaq Composite was down 9.71 points, or 0.13 percent, at 7,703.24.
The gains were broad-based with 10 of the 11 main S&P sectors higher. The technology sector was the only one in the red, down 0.3 percent.
Leading the decliners among tech was open source software provider Red Hat Inc, which slumped 11.9 percent after its current-quarter and full-year revenue missed analysts' estimates due to a strengthening dollar.
Microsoft's 0.8 percent decline and Nvidia's 1.9 percent fall also weighed.
The trade spat has pushed the Dow Jones index in the red for the past eight sessions and put it on track for its worst weekly performance in 13 weeks.
If the Dow fails to hold on to its gains, it would be the longest losing streak for the index in over 40 years.
Friday also marks what would likely be the biggest trading day of the year as a Russell rebalance takes effect at markets close.
Advancing issues outnumbered decliners for a 1.98-to-1 ratio on the NYSE and for a 1.05-to-1 ratio on the Nasdaq.
The S&P index recorded 16 new 52-week highs and two new lows, while the Nasdaq recorded 75 new highs and 33 new lows. (Reporting by Medha Singh in Bengaluru; Editing by Shounak Dasgupta)