* FTSE 100 up 0.2 pct
* Energy sector biggest riser as oil soars on OPEC deal
* RBS falls after failing bank stress test
* Ashtead, Zoopla, RPC hit record highs (Follow European and UK stock markets in real time on theReuters Live Markets blog on Eikon, see cpurl://apps.cp./cms/?pageId=livemarkets)
By Peter Hobson and Alistair Smout
LONDON, Nov 30 (Reuters) - Britain's top share index rose onWednesday, led by rebounding energy stocks after oil pricessurged to their biggest one-day gain in nine months when majorproducers agreed to output cuts to curb oversupply.
The blue-chip FTSE 100 index closed up 0.2 percent.But the index still fell 2.5 percent in November, snapping afive-month winning run.
The index has underperformed European peers this month, asit contains many defensive stocks that have lagged as investorshave bet on a return of inflation and growth following theelection of Donald Trump as U.S. president.
The oil and gas sector is also down 1.8 percent forNovember, as it has been whipsawed by speculation overWednesday's meeting of top oil producers in Vienna.
On Wednesday, however, the FTSE's oil and gas index rose 4.1 percent after the price of oil shot up asmembers of OPEC, the oil producers' cartel, agreed to trimoutput for the first time since 2008 in a last-ditch bid tosupport prices.
Brent crude was last up 8 percent, its biggest gainsince February, at around $50 per barrel. Analysts have said asuccessful deal by OPEC could send oil towards $60 per barrel,which would have a big affect on UK energy stocks.
Royal Dutch Shell and BP were the FTSE 100'sbiggest gainers, rising 4 percent and 3.8 percent respectively.
Energy stocks on the mid-cap FTSE 250 rose evenfaster, with Tullow Oil and Cairn Energy uparound 14 percent.
Conversely, the prospect of higher fuel bills pushed easyJetand International Consolidated Airlines Group down 2.1 percentand 2.5 percent.
Royal Bank of Scotland lost 1.4 percent after itfailed a stress test by the Bank of England, meaning it willhave to bolster its capital buffer to address a shortfall ofsome 2 billion pounds ($2.49 billion).
Barclays, Standard Chartered, LloydsBanking Group and HSBC all gained between 0.3and 1.6 percent, despite Barclays and Standard Chartered failingsome parts of the test.
The test's outcome was generally reassuring, said IpekOzkardeskaya, an analyst at London Capital Group.
"The results showed greater balance sheet resilience acrossthe UK's banking sector ... This is comforting news for allsectors, which may face uncertain times as the UK prepares toleave the European Union," she said.
Elsewhere, slipping gold and metals prices drove down miningstocks, with Fresnillo, Rio Tinto and RangoldResources losing between 2.5 percent and 2.8 percent.
Shares in Capita fell to their lowest since 2006after the outsourcing firm received two broker downgrades. Itsstock was down 5.9 percent, the FTSE 100's biggest faller.
Several stocks touched record high levels. Equipment rentalfirm Ashtead rose 3.7 percent and touched an all-timehigh after RBC raised its target price.
While overall the FTSE 250 was flat, mid-cap stock Zoopla briefly hit its best level after the property listingand price comparison website announced strong results and anoptimistic forecast, despite fears of a Brexit-related slowdownon the UK housing market. It finished up 5 percent.
Packaging company RPC also struck record levels onhigher revenues and broker upgrades, and was up 7.5 percent. (Reporting by Peter Hobson; Editing by Alison Williams)