Global miner Anglo American is set to take control of De Beers, buying out South Africa's Oppenheimer family in a $5.1 billion (3.1 billion pound) deal that ends the dynasty's direct links to the diamond business after almost a century.

Anglo has long been eying a deal to increase its 45 percent stake in unlisted De Beers -- which vies with Russia's Alrosa for the title of the world's largest diamond producer -- but Friday's announcement caught the market by surprise and sent the miner's shares up almost 4 percent.

The Oppenheimers have resisted Anglo's approaches for years and held on to their 40 percent stake even through the aftermath of the 2008 crisis which left shareholders forced to inject cash into De Beers as the luxury market tumbled.

It was unclear what prompted the family to change its mind, but the Oppenheimers indicated the decision to agree to Anglo's latest overture had taken into account a number of factors, including the need to diversify their investments.

James Teeger, managing director of E. Oppenheimer & Son, the family holding company, said the decision had been momentous and hinged on price -- long a point of difference between Anglo and the South African family.

After a long deliberation which took many factors into account, one of which obviously is diversification, the family decided to unanimously accept the offer, he said.

Anglo's motivation is a bigger share of De Beers in a booming market, as China and India turn to diamond jewellery even in the face of an uncertain economic outlook. A 10-year supply deal with producing country Botswana in September proved a key catalyst, prompting Chairman John Parker to again approach the Oppenheimer family.

Sources familiar with the negotiations said the talks had been difficult for the Oppenheimers, but the time was felt to be right.

They are tied up in one asset and we are currently in a very volatile environment, said one of the sources. Anglo, of course, will look to the longer term.

Nicky Oppenheimer, grandson of the dynasty's founder, is currently De Beers chairman, and will remain in place at least until the deal closes in the second half of 2012. The family also owns a direct stake of just over 2 percent in Anglo and has no plans to sell, Teeger said.

The family has yet to decide how it will redeploy the cash, but a substantial portion will be invested in Africa.

SPARKLING PRICE?

Anglo American Chief Executive Cynthia Carroll, who said the company had been working on the acquisition for years, said the long-term fundamentals for the diamond industry had prompted the deal. Improved security of supply, underlined by the agreement with Botswana signed in September, were another factor.

By 2015, China, India and the Gulf could overtake the United States as top diamond consumers, opening a huge market, and one increasingly suited to corporations, instead of the families and individuals whose links once dominated the diamond trade.

In China, only 15 years ago, there was virtually no culture of the diamond engagement rings, Carroll told reporters. Today more than half the brides in Beijing and Shanghai receive diamond engagement rings.

De Beers posted a 55 percent jump in first-half earnings in July on the back of record sales and an unprecedented jump in prices, driven by China, India and the United States, still the world's largest consumer of diamond jewellery.

Analysts and investors said the deal was a good one for Anglo at a valuation of around 6 times 2011 EBITDA, which is in line with far smaller, listed diamond producers like Petra Diamonds. Shares in Anglo were up 0.6 percent at 23.41 pounds in late trade, outperforming a flat sector index.

It looks like they got it at a good price, said Peter Major, analyst at Cadiz Corporate Solutions in Cape Town.

De Beers doesn't have the control over the market it used to, but it is still the biggest player and it's got a 120-year history in the business.

Founded by British entrepreneur and adventurer Cecil Rhodes in the 19th century, De Beers controls about 40 percent of the world's rough diamond supply.

Analysts at Liberum said they estimated the cash acquisition, which will not require new financing, would be 7.5-8.0 percent EPS accretive for Anglo over the next 3 years.

We think this deal will be taken positively. Shareholders have been clamouring in recent years for Anglo to either increase its stake in De Beers or to IPO its stake, they said.

Carroll said a listing was not currently on the cards.

She also dismissed speculation the move was linked to a decision by Chile's state-owned copper producer Codelco to exercise an option to buy 49 percent of Anglo's assets in the country's south. Codelco said last month it had secured a $6.75 billion bridging loan to buy the stake.

Anglo American said it had reached a deal with the CHL Group, which represents the Oppenheimer family interest, but added Botswana, which currently holds 15 percent of De Beers, had a pro-rata pre-emption right over the CHL shares, potentially lifting the country's ownership to 25 percent.

Botswana, the world's top diamond producing country, is currently considering its position.

Anglo has been a shareholder in De Beers for over eight decades and has been the company's largest shareholder since De Beers became a private company in 2001.

UBS and Nomura were advisers to Anglo-American on the deal.

(Additional reporting by David Dolan and Marius Bosch in Johannesburg and David Brough in London; Editing by Hans-Juergen Peters and Andrew Callus)