What happened 

Shares of mining-giant Rio Tinto (NYSE:RIO) took off in 2019, advancing roughly 28% through the first six months of the year, according to data provided by S&P Global Market Intelligence. That easily bested the S&P 500 Index's gain of "just" 17%. There were some ups and downs along the way for the stock, but the big story wasn't so much about Rio as it was about mining-peer Vale (NYSE:VALE).

So what

In late January, Vale experienced a massive breach at a mine-waste containment dam in its home country of Brazil. It was the second such breach for the miner in a disturbingly short period of time.

This second disaster, meanwhile, was much worse than the first. The company hadn't yet worked through all of the legal and financial impacts from the first disaster, so the second one further clouded its future.

One thing was very clear, however: Vale needed to take drastic action to ensure that no more mine-waste dams were at risk of rupturing. That included a decision to materially reduce production of iron ore.

A man standing at the mouth of a mine with the sun behind him.

Image source: Getty Images.

Rio Tinto is one of the largest producers of iron ore in the world. Vale's early-year disaster was expected to curtail production, which helped to boost iron-ore prices. Investors reacted logically, pushing shares of Rio higher on the expectation of improved financial results.

When Vale later put a number on its production pullback, investors got even more excited, with iron-ore prices continuing their advance. Iron-ore prices basically spent the first six months of the year trending higher, helped by the troubles at Vale. Rio's stock trailed along for the ride.

Now what

Rio Tinto is a miner, so its shares will generally follow along with the commodities it produces. The largest impact by far on the company's top and bottom lines is iron ore, which accounted for roughly two-thirds of the company's underlying earnings before interest, taxes, depreciation, and amortization (EBITDA) in 2018.

Although the long-term supply-and-demand picture for this vital metal is largely driven by economic factors, early 2019 has been something of an anomaly because of the troubles at peer Vale. While Rio Tinto is a well-run miner, after such a big run-up on the troubles at Vale, investors might want to wait for a clearer picture on the supply side of the equation before jumping in here.

That's doubly true given that iron-ore demand tends to be economically driven and nations around the world are showing signs of potentially slowing down. Caution is probably in order here.