CHANGING partners in Russia can be a fraught affair, to which the tribulations of Anna Karenina are as good a guide as any. But sometimes there is no choice. BP’s relationship with a group of oligarchs who owned half of TNK-BP, the company’s Russian joint venture, had broken down so completely that it was only a matter of time before one side or the other was forced to quit. In the event both seem to be getting out, to be replaced by the firm at the root of the trouble between them, Rosneft, Russia’s state-controlled oil giant. On October 17th it became clear that AAR, a consortium of Russian billionaires, had agreed to sell its half of TNK-BP to Rosneft for $28 billion. The next day, Rosneft reportedly offered BP the same amount for its half of the joint venture. The offer—which has yet to be approved by BP—would be paid partly in cash (up to $15 billion) and the rest in shares. It would make Rosneft the world’s largest publicly traded oil producer, and give BP a stake of over 10% in the new supermajor. It has been inevitable that one partner would quit TNK-BP since January 2011, when BP attempted to strike a deal to explore for Arctic oil directly with Rosneft, breaking an agreement that it would do all its Russian oil business through TNK-BP. A relationship that was turbulent anyway broke down irrevocably as the oligarchs sued BP, independent board members quit and decision-making ground to a halt. There were few ways out of the impasse. AAR would have had trouble raising the money to buy BP out, and anyway the Russian state, keen to expand its influence over the oil business, would have made life impossible for the oligarchs. Similarly, if Rosneft had bought out BP, the oligarchs would have feared being squeezed out.

The sum on offer to BP is substantial. Analysts had put a price tag of between $20 billion and $25 billion on it. And now would not be a bad time to head for the exit. BP paid $8 billion for the stake in 2003, earned more than $19 billion in dividends and would trouser $28 billion. Although TNK-BP contributed nearly a third of BP’s oil-and-gas output and 10% of its profits, prospects for growth are limited in almost every way—except in the amount of time the company’s top brass has had to devote to managing it. The latest dividend of $3.7 billion was probably a high point.

BP may need the money to help pay for the Deepwater Horizon oil spill. It has already paid out billions and rumours suggest that a settlement of a court case with the American government is coming soon that would resolve most liabilities. That could set BP back $20 billion or more.

Through a shareholding with Rosneft, BP would have access to Russia’s huge reserves of oil and gas. BP boasts that it gets on famously with Russia’s leaders, which would surely help. And the deal could revive the Arctic exploration pact that BP and Rosneft had planned before the oligarchs stepped between them. , only for the British company to see America’s Exxon Mobil take its place. As Stuart Joyner of Investec, a fund manager, points out, BP is still the leader in exploration among the big oil firms and could exploit its technological edge in winkling oil out of hostile environments like the Arctic.

For its part, Rosneft would get its hands on a big chunk of Russian oil production. It needs BP’s know-how to drill into the Arctic’s riches. And it may hope to learn from BP in its quest to become a global oil heavyweight. Maybe Rosneft could also learn some of the financial and operational discipline that the British company brought to TNK-BP.

Even the oligarchs may be relieved to put TNK-BP behind them. They are businessmen who want to make money, not oilmen who like going after the black stuff. On the other hand, Rosneft and BP had previously offered the oligarchs $32 billion for their stake (the offer was later withdrawn).

Unhappy in their own way

The deal with Rosneft would fit with BP’s wider aims of going back to basics after the Deepwater Horizon disaster, by building up its balance-sheet to focus on exploration and production. But exploring the Arctic with Rosneft, like other long-term alliances, would take years to bear fruit—and investors may want results sooner.

The company would be taking a risk. Russia’s minority shareholders are often ill-treated. TNK-BP was unique for an oil-and-gas investment in the country in that BP was an equal partner and had a veto. Yet it still went awry. BP will hope that having a new partner will work out better than it did for Anna Karenina, who flung herself in front of a train after the disintegration of her relationship with her replacement Russian lover.

Editor's note: This story was updated on October 22nd at 1.20pm.