The blue-chip FTSE 100 index <.FTSE> ended 0.2 percent higher at 6,353.52 points, after falling as much as 6,261.71 points after energy shares slumped following the failure of oil producers to reach agreement to freeze crude oil output.

The UK mining index <.FTNMX1770> rose 1.4 percent as copper prices rose, reversing earlier losses as funds bought metals on the back of a weaker dollar. A lower U.S. currency makes dollar-denominated metals cheaper for non-U.S. firms, a relationship used by funds to generate buy and sell signals from numerical models. [MET/L]

"Miners were a drag this morning, but they bounced back as metals prices gained and oil pared its losses. It seems that investors don't want to keep miners out of their portfolios as the sector has jumped 35 percent this year and have potential to rise further," Jawaid Afsar, senior trader at Securequity, said.

Shares in Anglo American (>> Anglo American plc), BHP Billiton (>> BHP Billiton plc) and Rio Tinto (>> Rio Tinto plc) rose 1.7 to 2.3 percent.

Oil and gas companies also partially recovered, but ended in negative territory as a deal to freeze oil output by OPEC and non-OPEC producers broke down on Sunday, sending oil prices down. OPEC's de facto leader Saudi Arabia demanded that Iran join the deal despite calls on Riyadh to save the agreement and help prop up prices.

Britain's oil and gas index <.FTNMX0530> was knocked off year highs hit last week, closing 0.5 percent lower.

"The fall in oil prices ... raises the question of whether BP (>> BP plc) and Shell will be able to maintain their dividend payments if oil remains lower for longer," AJ Bell investment director Russ Mould said.

Britain's largest energy supplier Centrica (>> Centrica PLC) was another notable faller, down 1.6 percent after it said it had lost more customers in the first quarter, highlighting continued pressure on the company's market share from rivals.

Travel and leisure stocks were in demand, helped by weaker oil prices. Broker Berenberg upgraded TUI to "buy" from "hold", sending its shares 2.3 percent higher, while mid-cap Thomas Cook (>> Thomas Cook Group plc) gained nearly 0.7 percent after an upgrade to "hold" from "sell".

Among small-caps, shares in Energy Assets Group (>> Energy Assets Group PLC) soared about 40 percent on the back of a $280 million takeover from Alinda Capital Partners. Sprue Aegis  (>> Sprue Aegis PLC) sank 54 percent after the home safety products supplier issued a profit warning.

(Editing by Richard Balmforth)

By Atul Prakash and Kit Rees