BP has said it intends to invest in the North Sea in the long term after it posted a forecast-beating one-third increase in second-quarter profits.

However, the oil and gas giant signalled concern about the potential implications of the conflict in Ukraine for the company's massive investments in Russia.

BP made $3.6bn (£2.1bn) profits net of one-offs in the three months to June, beating the consensus analyst forecast by around 10 per cent. The company made $2.7bn in the same period last year.

The firm appears to be reaping the rewards of its efforts to focus investment on areas of high-margin production, which it has said include the North Sea, in a period of high oil prices.

After increasing production in Norway in recent months, BP is set to ramp up output in the UK in the second half of this year when the Kinnoull field is due to come onstream around 140 miles north east of Aberdeen.

BP is investing billions of pounds in giant developments west of Shetland, like Schiehallion and Clair Ridge, which should start production within the next four years.

Asked about the company's view of the North Sea, a spokesman said: "The North Sea is one of our core areas in which we expect to invest over the long term."

The company made no comment on the debate about Scottish independence following previous indications that top brass had differing views on the subject.

Chairman Carl-Henric Svanberg told the comopany's general meeting in April: "It would not have, I would say, any major implications long term but anything that creates uncertainty will always mean more caution from business investors."

He added: "Our commitment to the North Sea certainly continues."

Chief executive Bob Dudley told the meeting: "We have a £10 billion programme of investment over the next 10 years in the North Sea. Therefore uncertainty does make us think carefully about issues like currency and other things."

In February Mr Dudley said his personal view is Great Britain is great and it ought to stay together.

BP faces uncertainty about the possible consequences of the conflict in Ukraine for a key part of its business. The company is the largest foreign investor in Russia through its 19.75 per cent stake in state oil company Rosneft.

With the European Union considering a new set of punitive measures against Moscow in response to the downing of a Malaysian airliner in eastern Ukraine, BP said: "If further international sanctions are imposed on Rosneft or new sanctions are imposed on Russia or other Russian individuals or entities, this could have a material adverse impact on our relationship with and investment in Rosneft, our business and strategic objectives in Russia and our financial position and results of operations."

BP has repeatedly said it will stand by its investments in Russia since Moscow's intervention in Ukraine, where pro-Russian rebels are fighting government forces in the east of the country.

Yesterday's numbers underline the importance of the investment in Rosneft to BP.

The company recorded $1bn underlying profit from its investment in Rosneft in the second quarter, compared to $218m in the same period last year.

Mr Dudley said the results showed BP was making good progress. He has reshaped the portfolio in the wake of the disastrous spill in the Gulf of Mexico in 2010 to focus investment on big projects that could generate cash over the long term.

The company has sold more than $40bn assets since the leak.

The disposals included a range of non-core assets in the North Sea.

The company spokesman did not comment on whether BP will sell any more North Sea assets under its plans to raise a further $6bn from disposals by the end of next year.

However, work on reshaping its North Sea portfolio is thought to be substantially complete.

The costs of the Gulf of Mexico spill increased by $260m in the second quarter, to $43bn in total.

BP warned: "The total amounts that will ultimately be paid by BP in relation to all the obligations relating to the incident are subject to significant uncertainty."

The size of the total bill will depend on the outcomes of a range of legal procedings in the USA.

BP announced a quartely dividend of 9.75 cents per share, up from 9 cents in the same period last year.

Shares in BP closed down 12.6p at 484.25p.