Thai Oil, nearly half-owned by top energy firm PTT Pcl , posted an April-June net loss of 6.9 billion baht ($219 million), versus a profit of 3.24 billion a year earlier and 7.2 billion baht profit in the previous quarter.
Fourteen analysts surveyed by Reuters had on average forecast a net loss of 6.2 billion baht for the quarter, with an estimated inventory loss of about 7 billion.
Earnings are expected to recover in the third quarter as refining margins should pick up on the back of rising demand and there should be no oil inventory loss, analysts said.
Thai Oil has a refining capacity of 275,000 barrels a day of crude oil and other feedstocks, representing about 22 percent of Thailand's total. It also runs paraxylene petrochemical and lubricant businesses through subsidiaries.