Oil company BP is rewarding long-suffering shareholders with a substantial dividend increase just days after it sold a stake in a Russian joint venture for billions of dollars.

BP also revealed Tuesday that it made a net profit of $5.5 billion in the third quarter, more than offsetting the $1.34 billion loss reported in the previous three months when the company wrote down the value of some assets. It was also 5 percent higher than last year's equivalent of $5.2 billion.

Most interest came with the news that BP was raising its quarterly dividend 12.5 percent to 9 cents per share. The company's shares were up 5.3 percent to 447.6 pence in late morning trading in London.

"The results were much stronger than we and the market anticipated - almost entirely in refining and marketing where the clean result was $3 billion versus our forecast of $1.8 billion," said Stuart Joyner at Investec Securities.

Chief Executive Bob Dudley said the dividend hike was based partly on BP's deal announced last week to sell its half share in Russian joint venture TNK-BP to Russia's state-controlled rival Rosneft, a deal which will yield $12.3 billion in cash for BP.

Some $11 billion in asset sales in the last quarter and new projects coming onstream also gave the board confidence to raise the dividend, he said.

"We recognize that we have had some very patient shareholders," Dudley said in a conference call with reporters.

BP is selling its 50 percent share in TNK-BP for $17.1 billion cash and a 12.84 percent stake in Rosneft. BP is using $4.8 billion of the cash to buy a further 5.66 percent of Rosneft for $4.8 billion.

Dudley said there had been no discussion with Rosneft about reviving BP's bid to join in exploring for undersea oil in the Arctic. That plan died because of opposition from BP's partners in TNK-BP.

"TNK-BP has been a great investment for BP and its partners but as I have said many times, the partnership seems to have run its course and BP did not want to leave Russia," Dudley said.

Rosneft has said it intends to buy the other half of TNK-BP, which is owned by four Russian tycoons, but Dudley said it was possible that Rosneft would decide not to carry through with that.

BP has faced a difficult few years since the big and costly oil spill in the Gulf of Mexico in April 2010. The company booked another $59 million in costs related to the spill in the third quarter, raising the nine-month total to $882 million.

BP said it expects to make the final payment this year into a $20 billion trust fund to compensate losses from the Macondo well blowout, in which 11 people died. Since the disaster in 2010, BP has announced disposals of assets valued at $35 billion toward its goal of $38 billion.

Dudley said BP still hopes to reach a "reasonable" settlement of a suit by the U.S. Department of Justice over the damages created by the spill. He said, however, that the company continues to prepare its defense should the case come to trial, which would be in late February.

Elsewhere, BP said its replacement cost profit, a key industry benchmark, during the period was $4.7 billion, down from $5.3 billion a year earlier. It blamed lower oil prices and production and higher costs. Revenue of $93.1 billion was also down from $97.7 billion a year earlier.

Production of oil and gas, excluding TNK-BP, was down 3 percent compared to a year ago at 2.26 million barrels a day. BP said it expects higher production in the fourth quarter as its maintenance season ends and new projects make a contribution.