(Adds details, share price)
July 29 (Reuters) - BP Plc posted abetter-than-expected 34 percent rise in quarterly profit afterincreasing production of higher-margin products and selling itsliquids and gas at higher prices.
Underlying replacement cost profit rose to $3.63 billion forthe second quarter, above the average analyst forecast of $3.49billion, according to Thomson Reuters I/B/E/S.
BP's shares rose marginally in early trading.
BP said rising oil and gas production from new upstreamproducts, as well as increased processing of heavy crude at themodernised Whiting refinery in the United States, contributed tocash flow in the second quarter.
BP said second-quarter production fell nearly 3 percent to3.1 million barrels of oil equivalent a day. Russian crude oilproduction made up about a third of the company's output.
BP is by far the biggest foreign investor in the Russian oilsector through its 19.75 percent stake in the Kremlin's stateoil champion, Rosneft.
BP said it had not felt any effect from U.S. sanctionsimposed this month on Rosneft over what Washington says isMoscow's reluctance to curb violence in Ukraine.
Things could get harder for Rosneft as the European Unionweighs a new set of punitive measures against Moscow in responseto the downing of a Malaysian airliner in eastern Ukraine.
These may include restrictions on bank transactions and aban on exports to Russia of oil and gas producing equipment.
BP said it would pay a dividend of 9.75 cents a share forthe quarter ended June 30 versus 9 cents a year earlier.
BP's shares were up 0.2 percent at 498.00 pence at 0728 GMT. (Reporting by Karen Rebelo in Bangalore; Editing by RobinPaxton)