If Facebook can't have Snapchat, it'll reach deep into its pockets to buy the next best thing.

Late Wednesday, Facebook announced that it will buy the popular instant-messaging app WhatsApp for a staggering $19 billion sum -- $4 billion in cash and approximately $12 billion in stocks upfront, plus another $3 billion in restricted stock over the next four years.

Facebook has shown a keen interest in developing or, with its $173 billion valuation, outright buying mobile messaging apps. Last year, Snapchat, a 2-year-old app that allows people to send disappearing photos and videos to one another, rebuffed a $3 billion offer from the social network.

But the 5-year-old WhatsApp is far more established, and has fetched its owners a far greater sum. This month, it had 450 million monthly users, having added 100 million of them in the last four months of 2013 alone.

WhatsApp is essentially a replacement to traditional text messaging. But unlike costly texts, which eat into cell phone owners' data plans, WhatsApps messages are sent over the Internet if connected to WiFi or a cellular network.

"Our mission is to make the world more open and connected," Facebook CEO Mark Zuckerberg wrote on his Facebook page. "We do this by building services that help people share any type of content with any group of people they want."

"More than 1 million people sign up for WhatsApp every day and it is on its way to connecting one billion people," he added.

Zuckerberg promised that WhatsApp will operate independently within Facebook, similar to how the photo-sharing app Instagram has been kept separate from Facebook proper after it was acquired for $1 billion in 2012. The social network has its own well-used messaging app, called Facebook Messenger, that Facebook has pushed its members to download over the past year. Zuckerberg said that Messenger and WhatsApp will not be merged.

Aside from Messenger, Facebook's efforts to grow in messaging have fallen flat. Poke, a Snapchat clone that also lets people send disappearing messages, failed to gain traction when released at the end of 2012. Instagram Direct, a recently introduced and widely touted Instagram feature lets people privately share photos, also doesn't seem to be well used.

So far, WhatsApp has forgone ads and instead made money by charging 99 cents to cell owners after 12 months of use. The app is initially free to download and is popular among young people who want to send photos and texts to friends abroad without being hit with high international data fees. The subscription fee is new territory for Facebook, which over its decade-long existence has reiterated again and again on its homepage that it is "free and always will be."

In a blog post, co-founder and CEO Jan Koum, who founded WhatsApp with fellow former Yahoo executive Brian Acton in 2009, insisted that "nothing" will change for customers. That includes ads: "you can still count on absolutely no ads interrupting your communication," he wrote. "There would have been no partnership between our two companies if we had to compromise on the core principles."