NEW YORK (TheStreet) - Morgan Stanley (MS) - Get Report was pilloried for its role in running Facebook's (FB) - Get Report May 2012 initial public stock offering, which sold $16 billion shares in the social network at a valuation of about $100 billion. Now, the investment bank has another $16 billion deal involving Facebook; the company's acquisition of messaging application WhatsApp, announced on Wednesday.

This time, however, Morgan Stanley is on the other side of the table.

The investment bank advised WhatsApp on its sale to Facebook in the $16 billion deal, which will be paid with $4 billion in cash and $12 billion in Facebook stock at an exchange ratio of $65.2650 a share. Additionally, the deal will give WhatsApp's founders and employees $3 billion in restricted stock units that will vest over four years subsequent to closing of the acquisition, bringing to the total for the deal to $19 billion.

At Wednesday closing share prices, the deal would dilute Facebook investors by less than 8% when counting the stock component of the deal and restricted stock units. The deal will also carry a $2 billion breakup fee, split between $1 billion in cash and $1 billion in stock.

Wednesday's merger, if completed, would significantly boost Facebook's presence in mobile messaging, helping it to compete with messaging apps on Apple (AAPL) - Get Report and Google (GOOG) - Get Report handsets and a new breed of messaging-based social networks like Snapchat. Facebook's existing Messenger app will remain independent, the company said.

Currently, over 450 million people use WhatsApp each month, with 70% of those users active on a given day. Facebook said the combination will help accelerate growth and user engagement across both companies.

"WhatsApp is on a path to connect 1 billion people. The services that reach that milestone are all incredibly valuable," Mark Zuckerberg, founder and CEO of Facebook said in a press release.

Zuckerberg is a controlling shareholder of Facebook's voting shares, meaning that the deal has virtually no likelihood of being rejected by shareholders.

Facebook was advised by Allen & Company and law firm Weil, Gotshal & Manges. In its 2012 purchase of Instagram, Facebook didn't hire outside advisors.

Freeman Consulting Services calculated in a preliminary estimate that WhatsApp advisors could earn between $35 million-to-$45 million, while Facebook advisors would earn between $32 million-to-$41 million in fees.

"WhatsApp's extremely high user engagement and rapid growth are driven by the simple, powerful and instantaneous messaging capabilities we provide. We're excited and honored to partner with Mark and Facebook as we continue to bring our product to more people around the world," Jan Koum, WhatsApp co-founder and CEO, said in a statement.

Prior to Facebook's IPO, the company bought photo-sharing app Instagram for $1 billion in a deal that some skeptics called overvalued at the time. Instagram, however, has been instrumental in increasing photo-sharing on Facebook and driving the company's mobile engagement.

Menlo Park, Calif.-based Facebook said that its acquisition of WhatsApp would likely mirror the company's purchase of Instagram in execution.

As with Instagram, WhatsApp's brand will be maintained. The company's core messaging product will continue to operate independently from Facebook's existing Messenger app, Facebook said. WhatsApp founder Jan Koum will join Facebook's Board of Directors.

"Facebook fosters an environment where independent-minded entrepreneurs can build companies, set their own direction and focus on growth while also benefiting from Facebook's expertise, resources and scale. This approach is working well with Instagram, and WhatsApp will operate in this manner," Facebook said.

Facebook shares were trading lower by nearly 4% in after-hours trading to $65.65.