It's safe to say that most investors dream of the day when one of their companies is bought out for a premium by a deep-pocketed buyer.

That dream became reality for unitholders of energy transport and storage specialist NuStar Energy (NS 0.89%) on Monday. A far larger peer has swooped in to purchase the company, and the buyout price is generous. Thanks to this development, NuStar's stock price was trading more than 17% higher week to date prior to Friday's market open, according to data compiled by S&P Global Market Intelligence.

Sunoco signed on the dotted line

That buyer is none other than energy incumbent Sunoco (SUN 0.57%), which has signed a definitive agreement with NuStar to acquire the smaller company in a deal valued at around $7.3 billion. The purchase, which is to be effected entirely in stock, includes the assumption of debt.

To be precise, Sunoco is to pay 0.4 of one of its units for each NuStar unit. According to the buyer, this represents a 24% premium to the 30-day volume weighted average prices (VWAPs) of the two companies as of Friday, Jan. 19 (the day before the deal was announced).

Additionally, NuStar is to pay slightly over $0.21 per unit in cash to its investors.

Sunoco added that both its and NuStar's boards of directors have unanimously approved the buyout. The deal is now subject to ratification by NuStar unitholders -- which seems likely, given the hefty premium -- and approval from the relevant regulatory bodies. It is expected to close in the second quarter of this year.

A win for both

This seems like a solid deal for both companies; NuStar investors get bought out at a lofty price, while Sunoco gains a synergistic asset that comprises 9,500 miles of pipeline and 63 terminals. It's also paying in stock, which is almost always less burdensome that having to pony up a mountain of cash. Unitholders of both companies should be pleased.