Chilean state-owned copper giant Codelco, the world largest producer of the red metal, turned a profit for the second straight quarter but still posted an $18 million loss for the first nine months of 2016.

The loss contrasts with the company’s performance in 2015, when it posted net income of $1.2 billion for the same nine-month period, Codelco CEO Nelson Pizarro said Friday in presenting its latest quarterly report.

The result was due in large part to the drop in global copper prices, the executive said.

After losing $151 million in the first quarter, Codelco said it had posted a profit for two straight quarters – including recording net income of $79 million between July and September – thanks to a plan to boost productivity and reduce costs.

“We’re putting the bad results behind us. But we believe there’s no room to get off track in terms of production nor our rigorousness in controlling expenses,” Pizarro said.

The chief executive said the company had reduced its direct production costs by 8 percent to $1.27 per pound of copper, a figure that is 11 percent lower than the Chilean mining industry’s average.

Codelco’s productivity, meanwhile, rose 6 percent in the first nine months of the year, while its production climbed to 1.27 million tons, up 1.2 percent from the same period of last year.

But that was not enough to offset a 17 percent drop in copper prices, which between January and September averaged $2.14 per pound. EFE