Facebook’s mega purchase of WhatsApp exposed the 10-year-old social network’s growing anxiety about losing relevance and staying on top of the social media world, analysts said.

Already the world’s largest social network, Facebook wants to be the leader in a field where it has struggled: mobile messaging.

The $19 billion deal could shore up Facebook’s weakening appeal among younger users and fortifies its growing strength on mobile devices and with photos. Still, industry analysts are concerned that Facebook may have overpaid for the messaging service — the deal values each of its 55 employees at more than $345 million — given that five-year-old WhatsApp has yet to develop a clear business model.

Wary investors initially sent Facebook’s stock falling Thursday before it regained ground.

Acquisitions are hardly the ideal way for Facebook to address its own weaknesses, analysts said.

“Doing these acquisitions is the third-best option, in our view,” wrote Pacific Crest analysts Evan Wilson and Brian Liang in a note Thursday. “We would rather see Facebook be successful organically or acquire these competitors earlier (and cheaper).”

Facebook has tried to launch its own messaging service to compete with the likes of WhatsApp and Snapchat, but Facebook Messenger never caught fire with its community of more than 1 billion users. WhatsApp has more than 450 million monthly users. SnapChat does not release user figures but is believed to have at least 30 million monthly active users.

“Facebook tried and largely failed, in our view, to develop Facebook Messenger into a product that would stem the growth of the mobile messaging services as a whole,” Wilson and Liang said. “It also tried and failed, in our view, to create products that would stunt the momentum of Instagram and Snapchat” — both of which the firm tried to buy. Instagram agreed to be acquired in 2012; Snapchat reportedly turned down a $3 billion bid from Facebook last year.

The purchase price was probably influenced by Facebook’s defensive mind-set and a desire to ensure that WhatsApp didn’t fall into the hands of a competitor, said Martin Garner, senior vice president of CCS Insight. Facebook will have little time to prove that the acquisition was worth a purchase price that amounts to more than 10 percent of its market capitalization, he said.

In WhatsApp, Facebook picks up a strong following in countries such as Brazil, India and Indonesia — all areas where Facebook is looking to grow. More of Facebook’s revenue comes from overseas than the United States, making an international footprint more important than ever.

Buying WhatsApp gives the company a short-term advantage in the messaging space, but it will still have to fight off increasing competition for a fickle social media audience that often hops from service to service.

“We are somewhat skeptical that [Facebook] can maintain its relevance and valuation over the long term based on its current product set,” Wilson and Liang said.

For WhatsApp users, both Facebook chief executive Mark Zuckerberg and WhatsApp chief executive Jan Koum have promised there will be few changes.

In a company blog post, Koum said the service will never include ads, something Instagram added shortly after Facebook bought it.

Maintaining WhatsApp’s privacy and security standards is clearly an important point for Koum, which people close to him attribute to his upbringing in Ukraine and to fears about something that more Americans may have begun to worry about: government surveillance.

“It’s a decidedly contrarian approach shaped by Jan’s experience growing up in a communist country with a secret police,” Jim Goetz wrote on Sequoia Capital’s Tumblr page. “Jan’s childhood made him appreciate communication that was not bugged or taped.”

Koum said in the post that he was unwilling to compromise on WhatsApp’s “core principles,” including its data-collection and advertising practices, when striking the deal.

“You can continue to use WhatsApp no matter where in the world you are, or what smartphone you’re using,” Koum wrote. “And you can still count on absolutely no ads interrupting your communication.”

Follow The Post’s new tech blog, The Switch, where technology and policy connect.