PetroChina (PTR - Get Report) and Cnooc (CEOHF) , two of China's largest oil producers, on Wednesday booked huge first-half profit slumps on shrinking revenues and warned of "headwinds" that would weigh on oil and gas prices for the rest of the year.

PetroChina, the country's largest oil company, said net profit fell to 531 million renminbi ($79.8 million) for the six months to June 30, down 98% on the Rmb25.4 billion it made over the same period last year. Revenues at the Beijing-based group fell to Rmb 739 billion down 15%.

Cnooc went one worse, posting a first-half net loss of Rmb7.74 billion, down from a profit of 14.7 billion a year ago. Revenues at Cnooc also fell more sharply too, down 28.5% to Rmb 55.1 billion. The half-year loss is the company's first since its IPO in 2001.

Cnooc's sharp decline in profits was expected after the company warned in July that it was likely to lose about Rmb8 billion in the first-half due to low oil prices and charges taken against its Canadian oil sands assets. Cnooc said Wednesday that it had booked Rmb10.3 billion of charges, primarily relating to the Canadian assets.

Shares in PetroChina closed in Hong Kong at HK$5.27 ($0.68), marginally lower than their Monday close of HK$5.28. Cnooc shares also closed slightly lower at HK$9.61, down HK$0.02.

The results add to a grim parade of oil company earnings as oil majors including ExxonMobil (XOM - Get Report) , Chevron (CVX - Get Report) and Royal Dutch Shell (RDS.B - Get Report) all tallied the cost of reporting periods that include some of the lowest oil prices in recent years.

PetroChina said that the average price of Brent crude over the six-month period was $39.81 a barrel, down 31.2% on the same period last year, while the U.S. benchmark West Texas Intermediate had traded at an average $39.64, down 25.6%.

Oil prices, which fell below $28 a barrel in January, have since rebounded and recently traded above $50, though both Cnooc and PetroChina warned of uncertain macroeconomic conditions that made further price increase unlikely during the second half of 2016 unlikely.

"Uncertainties still remain in both the international and domestic macro environment," Cnooc said in a statement. "Further recovery of international oil prices faces headwinds."

Oil prices have bounced around in recent days buoyed by reports that OPEC might agree a production cap, and undermined by reports of increasing output from countries including Nigeria, Iraq and Iran.

Brent crude fell more than 1% Wednesday, touching a low of $49.07, after the American Petroleum Institute said Tuesday that U.S. crude inventories had risen by 4.5 million barrels in the week ending Aug. 19. Analysts had expected the inventories to fall.

The U.S. government will release its weekly crude stocks data Wednesday morning.