Refiners in the United States have suffered from a lack of low-cost heavy crude in a market that has been hit by sanctions on Venezuela and Iran, and production cuts from Canada's Alberta province and OPEC members.

However, industry analysts at Simmons Energy and Credit Suisse said Marathon had managed to keep its operating costs per barrel lower than expected.

The company's earnings from its refining and marketing segment fell 11.6% to $906 million, but beat analysts' estimates of $623.5 million, according to IBES data from Refinitiv.

Shares of the company, which posted a surprise loss in the preceding quarter owing to lower-than-expected refining margins, were up 3% in early trading on Thursday.

"One-times that drove the 1Q19 miss are now firmly in the rear view mirror and MPC looks all set to capture its synergy benefits," Credit Suisse analyst Manav Gupta said.

Marathon's refineries ran at an average utilization rate of 97% in the quarter, compared with 100% in the year-ago quarter.

Marathon refined 3.1 million barrels per day, 1.1 million bpd higher than a year earlier. The company said the increase was primarily due to the addition of Andeavor, which it bought in October.

The company, which said it continued to focus on optimizing its portfolio that could include asset divestitures, expects to refine 3.05 million bpd at an operating cost of $5.90 per barrel

in the third quarter.

Net income attributable to the Findlay, Ohio-based company rose 4.8% to $1.11 billion in the quarter ended June 30, as it was also benefited from a more than three-fold rise in its retail segment earnings.

Excluding items, it earned $1.73 per share, beating analysts' average estimate of $1.32.

Total revenue and other income rose to $33.69 billion from $22.45 billion.

On Thursday, HollyFrontier Co also posted a better-than-expected profit, joining bigger rivals Valero Energy Co and Phillips 66 which reported their results last week.

(Reporting by Debroop Roy in Bengaluru; Editing by Maju Samuel)

By Debroop Roy