Facebook and the social network Twitter have announced an agreement to buy Snapchat for $18 billion.
The deal will give Snapchat an estimated $4 billion in cash, according to people familiar with the matter.
Facebook will retain the option to acquire Snapchat at a later date.
Snapchat will also be acquired through a share repurchase program, according the people.
Facebook and Snapchat had been negotiating for weeks over the deal.
Snapchat has more than 1 billion monthly active users.
Facebook says its new acquisition of the app will provide the company with more revenue for its billion-dollar billion-plus advertising business, and with the added revenue it can add new features and services to its app.
Facebook said it would provide Snapchat with additional services including video and photo sharing.
Snapchat had reported a decline in daily active users last quarter, according, to the company’s financial report.
The acquisition comes as the social media giant has been working on new ways to compete with Apple Inc., Twitter Inc. and other rivals for people’s attention.
Snapchat also said it plans to introduce new features to its platform that will enable users to send more videos and photos to their friends and to add videos to their feeds.
It also said that it will be able to sell ads to third-party partners and pay publishers to display its content.
Facebook CEO Mark Zuckerberg said last week that Facebook will invest $200 million to $250 million each year in the social networking company.
“We are going to be a company that’s the fastest growing company in the world,” he said.