On Monday, Plains All American Pipeline (PAA 0.45%) announced it planned to sell 800 miles of pipeline to Magellan Midstream Partners (MMP) for $190 million. Many energy investors have both of these companies on their radar, so let's take a closer look.

The deal
Magellan is picking up 800 miles of refined products pipelines, spread across two different systems. The first system is Plains' Rocky Mountain pipeline, which connects Casper, Wyo., to Rapid City, S.D., to the north, and Colorado Springs, Colo., to the south. It's roughly 550 miles of pipe and includes four terminals with about 1.7 million barrels of storage capacity.

The second system is a New Mexico pipeline that runs 250 miles south from Albuquerque into a tiny sliver of Texas and terminates at the border of Mexico. If everything goes according to plan, the transaction will close during the second quarter of this year.

Win-win
The deal is a pretty good one for both sides. Magellan is very much a refined products midstream company, while Plains is very much not. Plains has dubbed these lines "non-core" assets and its operating data certainly supports that. The MLP's bread and butter is crude oil transportation; refined product transportation only accounted for 3% of total transportation activities in the fourth quarter. This deal frees up some cash for the partnership to pursue its bolt-on acquisition growth strategy, picking up the exact assets it wants, where it wants.

Magellan, on the other hand, owns the largest refined products pipeline system in the country, with 9,600 miles of products pipeline and 49 terminals. The bulk of these assets exist east of Denver, so the deal gives Magellan exposure to the Rocky Mountain region. In fact, the Rocky Mountain line will connect to Denver on its way through to Colorado Springs, so the new line is in no way a stranded asset. Magellan also has a terminal in El Paso, which is where the New Mexico pipeline hits in Texas.

Foolish takeaway
Demand for refined products is trending down in the U.S. right now, so I don't have a problem with Plains selling these systems. Magellan still benefits, however, because the new assets will connect to its existing footprint in Texas, which is a strategic location for exporting refined products, which just happens to be a pattern that is trending up right now.