Many investors–including myself–were convinced Penn West Petroleum Ltd. (TSX:PWT)(NYSE:PWE) was on a one-way trip to bankruptcy.

The company’s debt was simply too much. As of March 31 it owed more than $1.8 billion in total debt–a huge number compared to its market cap. Management even went as far as warning investors the company was in danger of violating its debt covenants during the second quarter–a move that would trigger a technical default. At that point, it’s up to the bankers to decide whether the company should get further relief or not.

Everything changed on Friday when the company announced two important asset sales. The big one was the sale of its properties in the Dodsland Viking area of Saskatchewan, assets that were producing approximately 13,000 barrels of oil equivalent per day. The purchaser was Teine Energy Ltd., a company that’s backed by the Canada Pension Plan Investment Board.

The total price for those assets were $975 million.

Penn West also announced on Friday a $140 million sale of certain Albertan properties with current production of some 3,100 barrels per day.

In total, Penn West is scheduled to get more than $1.1 billion for these two assets, an amount that will get rid of much of its debt. It’ll also ensure the company doesn’t have to worry about covenants on its remaining debt for at least the rest of the year–possibly longer.

Naturally, markets cheered this move. In the afterhours of trading on Friday, Penn West shares soared almost 100% on the New York Stock Exchange.

But what does this mean for the long-term future of Penn West?

Like chopping off a leg?

Penn West’s management has spoken very fondly about its two main production sites: the Cardium and Viking areas. These two low-cost areas were supposed to be the company’s crown jewels.

Tough times call for hard measures. Although Friday’s asset sale was only for the Saskatchewan portion of Penn West’s Viking assets, it still must be bittersweet for management to get rid of such an important area.

The good news is the valuation this assumes. The total assets sold represent approximately 20% of Penn West’s production. These assets went for $1.1 billion. Thus, simple math dictates the rest of Penn West is worth $4.4 billion.

Right before the deal was announced, Penn West had a market cap of $563 million. Add on the company’s $1.8 billion in debt and you have an enterprise value of approximately $2.4 billion. That’s still a long way from a total company value of $5.5 billion.

And remember, these asset values are at the bottom of a devastating two-year bear cycle in energy. When crude returns to normal, these assets could be worth even more. If not, why would Penn West be having success selling them today?

What should investors do?

Once this deal closes, Penn West will be in fine financial shape for the first time in years. Add on the company’s production hedges and a much better overall outlook for crude, and I can see investors actually becoming bullish about the company.

But at the same time, I’d recommend caution. Increasing production isn’t going to happen anytime soon. Even if crude continues to recover, a company that barely avoided bankruptcy isn’t going to be in a hurry to borrow for capital expenditures.

Keep in mind that the company barely has positive fund flows today. It still needs crude to recover in order to generate enough cash flow to pay the interest on its remaining debt and to have capital available to put into increasing production.

In short, this latest transaction is very good news for Penn West. But the company still needs some cooperation from crude to work out as a good long-term investment. Friday’s news was a great start, but it’s hardly the end.

Like Penn West? Then you've got to check out these two energy stocks!

Penn West isn't the only energy stock in Canada with potential to head much higher.

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.