* Crude benchmarks, U.S. gasoline futures at 8-week high
* U.S. shale drilling slowdown may be temporary -analyst
* Marathon had strong Q2 product exports -CEO (New throughout, updates prices, market activity and comments to settlement)
NEW YORK, July 27 (Reuters) - Oil prices rose to an eight-week high on Thursday, as a rally in U.S. gasoline futures spurred further gains this week that came after key OPEC members pledged to reduce exports and the U.S. government reported a sharp decline in crude inventories.
U.S. gasoline futures were the biggest percentage gainer in the petroleum complex, up 1.7 percent to their highest since May 24.
"It's the summer driving season, so the market looks to gasoline for direction and with gasoline performing well, the whole market got an uplift," said Kyle Cooper, consultant at ION Energy in Houston.
Benchmark Brent futures rose 52 cents, or 1 percent, to settle at $51.49 a barrel, while U.S. West Texas Intermediate (WTI) crude gained 29 cents, or 0.6 percent, to settle at $49.04.
That was the highest settlement for both contracts since May 30, putting them into technically oversold territory near their 200-day moving averages, which traders called a point of technical resistance.
"Current bullish momentum is being driven by an array of supportive items that include a supportive outcome to last Monday's OPEC meeting" and continued declines in U.S. inventories, Jim Ritterbusch, president of Chicago-based energy advisory firm Ritterbusch & Associates, said in a note.
Marathon Petroleum Corp CEO Gary Heminger said the company processed a record 1.9 million barrels per day of crude oil at its seven U.S. refineries in the second quarter, fueled in part by robust refined product exports.
On Wednesday, the U.S. Energy Information Administration reported a 7.2 million barrel drop in U.S. inventories in the week to July 21, much more than the 2.6 million barrels forecast.
Saudi Arabia said this week it planned to limit crude exports to 6.6 million barrels per day (bpd) in August, about 1 million bpd below the level last year.
Kuwait and United Arab Emirates, fellow members of the Organization of the Petroleum Exporting Countries, have also promised export cuts.
U.S. shale producers including Hess Corp, Anadarko Petroleum and Whiting Petroleum announced plans this week to cut spending this year.
Some analysts doubted whether shale drilling would slow for long.
"Recent evidence of a slowdown in U.S. upstream activity has been exaggerated and will if anything be transitory," Stephen Brennock at oil brokerage PVM said.
U.S. fuel exports are on track to hit another record in 2017.
Royal Dutch Shell, France's Total and Norway's Statoil reported sharp rises in cash flow from second quarter operations.
Profits for the three companies beat analyst expectations.
(Additional reporting by Ahmad Ghaddar in London and Fergus Jensen in Singapore; Editing by Edmund Blair and David Gregorio)