April 28 (Reuters) - U.S. independent oil refiner Phillips 66 reported a 39 percent rise in quarterly profit, helped by a $423 million one-time gain from the consolidation of a petroleum coking venture.
The company also gained from a rise in refining margins, which helped mitigate the impact of higher costs and a fall in volumes, caused by heavy maintenance activity.
Excluding one-time items, loss in Phillips 66's refining business narrowed to $2 million in the first quarter, from $95 million, a year ago.
Realized margins improved to $8.55 per barrel in the first quarter from $6.47 in the fourth.
Robust demand for refined products and declining inventories are offering a glimmer of hope to refiners, whose margins fell sharply in 2016 due to a glut of gasoline and diesel.
Valero Energy Corp, the biggest among U.S. oil refiners, also reported a better-than-expected quarterly profit on Tuesday as sales in its refining business surged 40 percent.
Phillips 66's consolidated earnings rose to $535 million, or $1.02 per share, in the first quarter, from $385 million, or 72 cents per share, a year earlier. (Reporting by Swetha Gopinath in Bengaluru; Editing by Shounak Dasgupta)