HOUSTON (AP) — Marathon Oil Corp. on Wednesday reported solid second-quarter profit as increased production offset a decline in oil and natural gas prices.

The Houston company said it earned $393 million, or 56 cents per share, for the three months ended June 30. That compares with $996 million, or $1.39 per share, a year ago that included $698 million in profits from a refining operation that was spun off last year.

Revenue fell 2.1 percent to $3.78 billion in the period.

Excluding a loss from dispositions, Marathon Oil said it earned 59 cents per share in the second quarter. That met Wall Street expectations, according to FactSet.

Marathon, which produces oil and natural gas from a variety of wells around the world, said sales rose 20.8 percent in the period.

Meanwhile, it sold oil and liquid hydrocarbons for an average of $97.81 per barrel, down 6.8 percent from the same period a year earlier. It sold natural gas at an average of $2.70 per 1,000 cubic feet, down 15.9 percent.

Shares fell 16 cents to $26.31 in morning trading.