For a company to execute a successful asset sale, it needs two key elements: Get a good package in return for the assets, and put that package to work to deliver the most value to the company. This past earnings release, oil and gas specialist Denbury Resources (DNR) gave a textbook example of how to get the most for your assets -- and how to not spend the returns.

The good sale ...
In September, Denbury announced that it will sell its assets in the Bakken play in North Dakota to XTO Energy, a subsidiary of ExxonMobil (XOM 0.23%). Even though the company is still looking to grow fast, the sale of these assets was a good strategic move.

Denbury specializes in enhanced oil recovery, or EOR, by injecting CO2 into mature oil wells (which are wells that require more than traditional pumping to extract oil), and transporting CO2 to oil wells involves a vast network of pipelines. Since Denbury had no network in the Bakken, it needed to purchase CO2 from companies in the region such as Kinder Morgan (KMI -0.05%) and Whiting Petroleum (WLL), which are the big players in the area. Since the Bakken doesn't play well into Denbury's strengths, it makes more sense to get rid of these assets and operate closer to their pipeline network.

Denbury did a commendable job selling these assets at top dollar. The negotiated sale netted Denbury $1.6 billion in cash, the operating interests in the Weber Field in Texas and the Hartzog Draw field in Wyoming, and the rights to either purchase interest in the CO2 reserves in the Labarge Field in Wyoming or just buy the CO2 from XTO Energy.

... followed by poor allocation
During the third-quarter earnings conference call, Denbury CEO Phil Rykhoek detailed a plan for the company to repurchase 4.6 million of the company's shares using some of the cash from the Bakken sale. This will deliver some value to shareholders by reducing the total shares on the open market, but it is far from the best method to create value for Denbury at this time.

With oil and gas prices still recovering from their big drops back in April, several companies look to shed some of their less productive plays. This past September, Chesapeake Energy (CHKA.Q) sold 1.03 million acres in the Permian Basin for almost half of what it expected in its guidance. Not only is this a sign that Denbury could acquire assets at depressed prices, but the company also has a strong existing pipeline presence in the Permian Basin. These mature oil and gas fields would be an ideal pickup for it to cover the loss in production from the Bakken sale.

What a Fool believes
Denbury's share buyback isn't the best use of cash, but the move isn't a company-killer, either. As an EOR specialist, it will have plenty more opportunities to pick up maturing wells for discounted prices. As an investor, you should probably keep an eye on Denbury's next moves to see whether this flub is just an aberration.

With so much momentum behind getting North America to achieve energy independence, the oil and gas industry could be on the cusp of a boom. While Denbury will more than likely play a part in this, we at The Motley Fool have identified The Only Energy Stock You'll Ever Need. To get a free look at this report, click here.