Freeport-McMoRan Inc (NYSE:FCX) has spent most of the last few years working itself back from an ill-timed investment in the oil and natural gas industry. By the start of 2017, however, it was starting to make material progress in this effort. But just as it was starting to gain some traction there, it got hit with troubles elsewhere in its portfolio. Here's where things went wrong for Freeport-McMoRan in 2017.

Correcting the big mistake

Back in 2013, when oil and natural gas prices were nearing a peak, Freeport bought two energy companies. The copper and gold miner's goal was to diversify its business by expanding into oil and gas. It sounded like a great plan, since energy prices were holding up better than copper and gold prices at that point. However, within a year of the investment, oil prices started a deep downturn that turned the new business into an albatross.

Copper pipes

Image source: Getty Images

The real problem, however, was leverage. Freeport's long-term debt went from roughly $3.5 billion at the start of 2013 to just over $20 billion by the end of it. With oil prices starting a deep descent in mid 2014, the newly acquired energy business started to eat cash that was already tight due to the downturn in the copper and gold sectors. With Freeport having to cover the increased interest expense of that huge leverage expansion, investors started to wonder about the company's future. Interest expenses had tripled between 2012 (before the oil acquisitions) and 2016, a span that saw the company's bottom line go from black ink to red.

By the time 2017 began, however, Freeport had started to regain its footing. It was reducing leverage and selling oil and gas assets, an effort helped along by the 2016 recovery in copper and gold prices. Long-term debt fell around 25% in 2016 to roughly $15 billion. The progress on this front continued in 2017, with long-term debt down to $12.5 billion by the end of the third quarter. Couple that with the sale of oil assets over the past couple of years and it would have been reasonable to expect 2017 to be a very good year. In fact, the miner has been posting positive earnings since the third quarter of 2016. The underlying business has, indeed, improved in an important way.

The story at a big mine goes awry

Unfortunately, however, the uncertainties at Freeport weren't over, with a dispute at the giant Grasberg Mine in Indonesia taking center stage in early February. This single mine accounts for roughly 30% of Freeport's copper reserves and virtually all of its gold reserves, clearly an important asset for the miner. Shares sold off sharply on the news

A list of Freeport-McMoRan's largest assets, showing that Grasberg represents about 30% of its copper reserves and all of its gold reserves

Grasberg is a hugely important mine for Freeport. Image source: Freeport-McMoRan, Inc.

The dispute arose when the Indonesian government wanted to get more financial benefit from the mine then it had. This included asking Freeport to give up a material portion of its ownership position so that it would end up being a minority stakeholder. Needless to say, Freeport didn't like the idea, and wound up engaged in tense discussions throughout the year. A tentative framework was agreed to in August (with Freeport agreeing to reduce its ownership of the mine to 49%), but the two sides still hadn't hammered out the fine details -- a process that remained contentious.

The two sides were nearing a final agreement by the end of 2017, according to Bloomberg. However, no news has been released on that front as the final days of December are drawing to a close. So basically Freeport spent all of 2017 grappling with the Indonesian government over Grasberg. This lingering cloud on the company's brightening horizon was the big story of 2017, and it wasn't a good one.

Wait for more clarity

If I had to sum up Freeport's 2017, it would be this: Just when things started to look better on one front, another important battle broke out. I'm confident that Indonesia and Freeport will eventually work something out, but what that something is isn't clear just yet, and Freeport's take from the mine could be materially different going forward.

Even when an agreement is reached, however, the company still has to contend with a 2041 end date for its operating rights at Grasberg, one of its largest assets. Until there's more clarity on the dispute with Indonesia, most investors should probably avoid Freeport-McMoRan. It's really a special-situation play at this point.

Reuben Gregg Brewer has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.