The U.S. refining industry is probably reaching its nadir. Pipeline major Energy Transfer Partners (NYSE: ETP) is set to acquire downstream company Sunoco (NYSE: SUN) for $5.3 billion in a cash and unit transaction. Sunoco, on its part, was looking to dispose of its refining operations to make sure that it gets attractively valued. The company had been steadily trimming down its refining assets over the past three years.

Cutting the flab?
Simply put, the refining segment hadn't been worth the money. The final nail in the coffin came last September, when the company announced that it would exit its refining business altogether. Sunoco had initiated a plan to sell its two remaining refineries in Pennsylvania. Before that, Sunoco sold off its Toledo refinery for $1 billion in March 2011, its Tulsa refinery to Holly -- now a part of HollyFrontier (NYSE: HFC) -- for $157 million in 2009, and its Eagle Point refinery the same year.

It wasn't just the refining segment that Sunoco was looking to dispose off. Last year, the company exited its chemical business by selling its last remaining facilities, in Philadelphia and Ohio. In 2010, Sunoco had already sold off its polypropylene chemicals business, which had facilities in Texas, Wyoming, and Pennsylvania.

Shrewd move
So what exactly was ETP eyeing? It's the logistics business, through Sunoco's 32.4% interest in Sunoco Logistics Partners (NYSE: SXL), which operates the retail and pipeline businesses. ETP is consolidating its pipelines and terminals business; as ETP's CEO Kelcy Warren puts it, "This transaction ... represents the next step in Energy Transfer Partners' transformation into a more diversified enterprise with an integrated and expanded footprint." That was what interested ETP, and it makes perfect sense. ETP was waiting until Sunoco shed all its unwanted and loss making businesses, and then pounced on the opportunity at just the right time.

In terms of competition, the consolidation should bring ETP into more even terms with current pipeline leader Kinder Morgan Energy Partners (NYSE: KMP). Kinder itself had consolidated its position in the pipeline and storage space by its general partner's acquisition of El Paso. In short, the oil and natural gas storage and pipeline space is heating up.

Foolish take away
Sunoco's shareholders have a good deal here. With the transaction valued at $50.13 per share, it's a 22.5% premium over its current price. While it remains to be seen to what extent the latest acquisition will benefit ETP, there's no doubt the storage and transportation industry is at a critical stage. The more powerful players will want to consolidate their position and muscle out the weaker ones. Meanwhile, you can keep abreast of the situation by adding Energy Transfer Partners to your free, personalized Watchlist.

However, if you like energy stocks, we have a stock idea that could knock your socks off. Read about it in The Motley Fool's special free report on the energy industry and its best prospects. It's free for a limited time.