The recent rally in gold is starting to bring investors back into the mining sector.

Let’s take a look at Yamana Gold Inc. (TSX:YRI)(NYSE:AUY) and Kinross Gold Corporation (TSX:K)(NYSE:KGC) to see if one deserves to be in your portfolio.

Yamana

Yamana holds a portfolio of properties located throughout the Americas with mines located in Canada, Mexico, Argentina, Brazil, and Chile.

The past five years have not been kind to Yamana’s investors as falling gold prices and troubles in some of its mines resulted in a nasty haircut. In fact, the stock traded at $20 per share in late 2012. Today investors can pick it up for $3 per share.

Management has worked hard to right the ship, and those efforts are starting to bear fruit. All-in sustaining costs (AISC) for Q3 2015 came in at US$841 per ounce of gold. That puts the company among the lowest-cost producers in the industry.

Production for the quarter was pretty much in line with the same period in 2014, but output from the core assets is expected to rise in the coming years.

In an effort to reduce operating costs and refocus investments, Yamana moved its non-core assets into a wholly owned subsidiary, Brio Gold. The original idea was to spin off or sell Brio Gold to monetize the assets, but in late 2015 the company decided to wait for a market recovery, citing improved valuation due to lower costs and new resource discoveries.

That decision is beginning to look like a wise one, and investors could see the company get a much better price for the Brio Gold division than initially expected, especially if gold can maintain or extend its recent gains.

The company expects 2016 gold production to be 1.2-1.3 million ounces. Net debt is about US$1.7 billion, which is still a bit high given the market cap of US$2 billion.

Kinross

Kinross has also struggled over the past five years.

The company spent US$7.1 billion to buy Red Back Mining near the peak of the gold market, and the deal has been a disaster for the company and its shareholders.

How bad?

Kinross has written down the majority of the assets, and the stock has fallen more than 80%.

This doesn’t sound like a good situation to invest in, but management has done a good job of reducing debt and putting the company on sound financial footing.

Kinross finished Q3 2015 with US$1.025 billion in cash and cash equivalents and long-term debt of US$1.73 billion. The company recently spent US$610 million of the stash to buy assets in Nevada.

The deal will add 430,000 ounces per year of production and help reduce AISC in 2016.

Production for 2015 was expected to be 2.5-2.6 million gold-equivalent ounces. With the addition of the new assets, output could top three million gold-equivalent ounces in 2016.

The company still has some work to do to reduce costs. AISC for Q3 2015 came in at US$941 per ounce.

Kinross has a market cap of about US$2.3 billion.

Which should you buy?

The recent rally shows investors how much potential lies in these stocks. Both should move higher on continued strength in the gold market, and either one could become a takeover target if the industry begins to consolidate.

Yamana has a lower cost structure, but I think Kinross is the better choice right now based on its stronger balance sheet and much larger production outlook.

Just released! One top stock for 2016 and beyond

Exports of liquefied natural gas could be one of the best growth opportunities out there for long-term investors. And, we think we've identified the Canadian company to invest in. It's a global company with operations across nearly 20 countries and 70 locations. We like it so much, we've named it as 1 Top Stock for 2016 and Beyond. To find out why, click here now to learn how to access your FREE copy today!

NEW! This Stock Could Be Like Buying Amazon In 1997

For only the 5th time in over 14 years, Motley Fool co-founder David Gardner just issued a Buy Recommendation on this recent Canadian IPO.

Stock Advisor Canada’s Chief Investment Adviser, Iain Butler, also recommended this company back in March – and it’s already up a whopping 57%!

Enter your email address below to claim your copy of this brand new report, “Breakthrough IPO Receives Rare Endorsement.”

Fool contributor Andrew Walker has no position in any stocks mentioned.