PALO ALTO — Facebook will fork over a whopping $19 billion to buy 5-year-old mobile messaging startup WhatsApp. Facebook Inc. was advised by Weil, Gotshal & Manges, and its target turned to Fenwick & West for legal counsel.

The acquisition price dwarfs that of Facebook’s biggest buy to date, the purchase of Instagram in 2012 for $1 billion. It’s also the biggest Internet deal since the 2000 union of AOL Inc. and Time Warner Inc.