LONDON-- BP PLC on Tuesday reported a rise in second-quarter profit, boosted by its investment in Russian energy group OAO Rosneft, but warned that further economic sanctions on Russia could adversely impact its business.

The oil major said replacement-cost profit came in at $3.18 billion for the quarter, compared with $2.4 billion in the same period last year. Replacement-cost profit strips out inventory gains or losses and is similar to net profit according to U.S. generally accepted accounting principles.

BP became a major Rosneft shareholder last year, with nearly a 20% stake, when the U.K.-listed company sold its 50% stake in TNK-BP for cash and stock.The deal was aimed, in part, to exit TNK-BP's difficult politics.

However, Russia's involvement in the Ukraine conflict has created a new source of anxiety for BP and in a note detailing risks and uncertainties attached to its earnings on Tuesday the company warned its business in Russia could be hurt by sanctions.

"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 said.

The U.S. has already added Rosneft boss Igor Sechin to its sanctions list, prohibiting U.S. nationals from doing business with Mr. Sechin.

Rosneft contributed $1.02 billion of replacement-cost profit to BP in the second quarter, compared with a $218 million profit in the same period last year, in part boosted by favorable exchange-rate movements.

BP reported a higher second-quarter profit despite the company's production falling 6% in the quarter to 2.11 million barrels of oil a day. It also warned that production for the third quarter would be lower than the second.

The oil giant said the lower production levels reflected planned turnaround and seasonal maintenance activities in Alaska and the Gulf of Mexico, adding that the seasonal reduction will be slightly larger than experienced in the same quarters of 2013 because of the phasing of these activities.

Net profit for the quarter was $3.37 billion, up from $2.04 billion a year earlier, on revenue of $95.83 billion, compared with $95.7 billion.

The company increased the dividend to 9.75 cents a share, from 9 cents a share.

Write to Ian Walker at ian.walker@wsj.com and Justin Scheck at justin.scheck@wsj.com

Subscribe to WSJ: http://online.wsj.com?mod=djnwires