As the energy sector got crushed, investors did one of three things. They either hung on, took their losses and moved their capital somewhere else, or moved into energy plays that were viewed as safer.

There’s no better example of the last point than Suncor Energy. Even though the price of crude is off more than 50% compared to highs set in 2014, Suncor shares have only fallen some 25%. This is because the company has downstream assets that insulate it from the price of oil, and because the company’s balance sheet is good enough that nobody questions its solvency. Suncor isn’t about to have issues with its bondholders.

The pipelines are the other part of the energy sector that have attracted investor capital. While they haven’t held up quite as good as Suncor, they’ve still outperformed the whole sector. Over the last year, Inter Pipeline Ltd (TSX:IPL) is down almost 21%, while the sector itself has declined nearly 26%. Plus, Inter Pipeline has paid an uninterrupted dividend during that time.

Should you buy it for your portfolio? Let’s take a closer look.

The bull case

There’s a lot to like about Inter Pipeline compared with its peers.

Firstly, it has an interesting moat. It has concentrated its expansion efforts in the oil sands, which are long-life assets with decades of production left. Not only does this plan ensure healthy demand for its pipelines over the long term, but it also means it only has to deal with one government when the time comes to get pipelines approved. That’s a big advantage.

There’s potential to expand in the oil sands as well. Inter Pipeline has identified $4 billion in growth projects in the oil sands region alone as the next wave of oil sands developments come online. Many of these projects are delayed right now, but as soon as crude recovers, the region will start expanding again.

The company also has a very attractive dividend. Shares currently yield 5.6%, which is one of the better yields in the sector. The payout ratio is about 70% of funds from operations, which is about the historical average. Dividend growth has been good too, coming in at just under 7% over the last decade.

The risk

The big risk for Inter Pipeline is the future of the oil sands.

For many operators in the region, $50 per barrel of oil is a losing proposition. Depending on the location and the cost to extract bitumen, some operators are losing up to $10-15 per barrel during this trying time. Remember, the price of the heavy, tar-like bitumen is often $20-25 per barrel less than the price for light sweet crude, because the former is that much harder to refine.

If crude doesn’t head higher, oil sands operators will eventually get into trouble. It might not happen in 2015 or 2016, but low prices will eventually cause major problems.

The market isn’t exactly pricing in a bullish scenario for crude either. Crude oil for October 2020 is only priced at $59.31 per barrel. And for December 2023, the price is only expected to be $60.97 per barrel of crude.

If the price of crude remains below $60 for the better part of a decade, oil sands operators are going to be in big trouble. It’s that simple.

That sort of scenario is very bad news for Inter Pipeline. Yes, volume from the oil sands is contracted out, but investors have to remember that a contract is only as good as the counter party. In other words, a contract is no good if the other side can’t honour it.

I’m not saying that the giants of the oil sands are close to going to zero, because that’s not the case. But many of the smaller players in the region–such as Pengrowth Energy–are having very real financial problems. Just a few of the smaller players going to zero could have a very real impact on Inter Pipeline and its dividend.

Like with many of its peers, an investment in Inter Pipeline is a bet on crude’s recovery. As long as we see a gradual improvement in the price of the commodity, this 5.6%-yielding stock should do just fine.

Bullish on energy? Then you've got to check this out!

Inter Pipeline will likely do well if the prices of crude oil and natural gas recover. But its potential pales in comparison to these two stocks.

Check out our special FREE report "2 Canadian Energy Stocks on the Cusp of a Powerful Long-Term Trend". In this report, you'll find that Canada is rich in other energy sources that are poised to take off. Click here now to get the full story.

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 Nelson Smith has no position in any stocks mentioned.