BP Plc's (NYSE: BP) oil trading business, one of the biggest in the sector, reported a rare loss in the fourth quarter of 2016 after it lost a $70 million lawsuit over an oil cargo delivered to a Moroccan refinery.

BP's CFO Brian Gilvary said that, due to flat trading positions ahead of a crucial OPEC meeting at the end of November 2016, and the lawsuit, the company's oil trading division made a "small loss" in the year's fourth quarter.

"There was a natural inclination to flatten up all of the books and there was also an adverse court ruling against us, which is a $70 million hit," he told analysts on Feb. 7.

BP sold a cargo of Russian Urals crude to Moroccan refiner Samir in August 2014, which was not paid for, and the National Bank of Abu Dhabi (NBAD) took on 95% of that debt.

But London's High Court ruled last November that BP did not have the right to pass on the debt, and ordered BP to pay $68.9 million plus interest to NBAD.

Gilvary said if BP had not been ordered to make the payment, its oil trading business would have made a profit in the period.

Across 2016, BP's overall energy trading business was profitable, Gilvary said, adding that its gas trading desk had a "good result" in the fourth quarter.