Facebook on Thursday said it has reached a "definitive agreement" to acquire mobile messaging firm WhatsApp for approximately $16 billion, including $4 billion in cash and about $12 billion worth of Facebook shares.

However, the ultimate cost of the deal is likely to be about $19 billion as "the agreement also provides for an additional $3 billion in restricted stock units to be granted to WhatsApp’s founders and employees that will vest over four years subsequent to closing."

WatsApp will continue to operate independently and retain its brand, while its co-founder and CEO Jan Koum will join Facebook Board of Directors, the social networking firm said in a statement.

WhatsApp’s core messaging product and Facebook’s existing Messenger app will continue to operate as standalone applications.

The acquisition supports Facebook and WhatsApp's shared mission to bring more connectivity and utility to the world by delivering core internet services efficiently and affordably. The combination will help accelerate growth and user engagement across both companies, it added.

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

In the event of termination of the Merger Agreement under certain circumstances principally related to a failure to obtain required regulatory approvals, the Merger Agreement provides for Facebook to pay WhatsApp a fee of $1 billion in cash and to issue to WhatsApp a number of shares of Facebook’s Class A common stock equal to $1 billion based on the average closing price of the ten trading days preceding such termination date, the statement added.

Facebook was advised by Allen & Company LLC and Weil, Gotshal & Manges LLP; and WhatsApp was advised by Morgan Stanley and Fenwick & West, LLP.