SAN FRANCISCO – When Instagram reached 1 billion users in 2018, Mark Zuckerberg, Facebook's chief executive, called it "an amazing success." The photo-sharing app, which Facebook owns, was widely hailed as a hit with young people and celebrated as a growth engine for the social network.

But even as Zuckerberg praised Instagram, the app was privately lamenting the loss of teenage users to other social media platforms as an "existential threat," according to a 2018 marketing presentation.

By last year, the issue had become more urgent, according to internal Instagram documents obtained by the New York Times.

"If we lose the teen foothold in the U.S. we lose the pipeline," read a strategy memo, from October 2020 that laid out a marketing plan for this year.

Facing that threat, Instagram left little to chance. Starting in 2018, it earmarked almost its entire global annual marketing budget — slated at $390 million this year — to targeting teenagers, largely through digital ads, according to planning documents and people involved in the process. Focusing so singularly on a narrow age group is highly unusual, marketers said, although the final spending went beyond teenagers and encompassed their parents and young adults.

The Instagram documents reveal the company's angst and dread as it has wrestled behind the scenes with retaining, engaging and attracting young users. Even as Instagram was heralded as one of Facebook's crown jewels, it turned to extraordinary spending measures to get the attention of teenagers. It particularly emphasized a category called "early high school," which it classified as 13- to 15-year-olds.

Any slip by Instagram could have larger consequences for Facebook. The social network hoped that Instagram would entice more young people to all of its apps, replenishing Facebook's aging user base, according to the documents. But the documents also show that Facebook has since abandoned aspirations of becoming a teen destination, just as Instagram has increasingly debated how to hang on to youthful audiences.

The disclosures underscore how much is at stake for Facebook as it seeks to address an outcry in Congress and from the public over Instagram's effects on users' mental health.

According to separate documents from Facebook whistleblower Frances Haugen, which the Wall Street Journal published, Facebook has known that some teenage girls reported feeling worse about their body image when using Instagram. Haugen testified at a Senate hearing this month that Facebook deliberately kept people, including children, hooked on its services.

Instagram's fears about losing young users also highlights how much the internet industry prizes them — and how elusive their attention can be, even for an app that is itself young. Instagram, which Facebook bought in 2012, is less than 12 years old. It has plenty of cachet with teenagers, but rivals such as TikTok, the Chinese-owned video app, and Snapchat, the ephemeral messaging app, keep nipping at its heels.

Instagram, with more than 1.3 billion users, remains the biggest of those platforms, with TikTok at 1 billion users and Snapchat at 293 million, according to data from the companies. But in a survey this year from the financial services firm Piper Sandler, 35% of teenagers said Snapchat was their top social media platform, with 30% saying TikTok. Instagram was third with 22%.

Concerns over teenage users have recently deepened among Instagram's executives, including Adam Mosseri, the head of the app, said five current and former employees, who were not authorized to speak publicly.

In a meeting last month, they said, executives pored over data showing that a bump in new teenage users during the pandemic was ending. "Teen time spent," a term denoting how many hours a day teenagers are on Instagram, also dipped. That was alarming because Instagram relied on teenagers to spend an average of three to four hours a day on the app, nearly double what adults spend on it, they said.

Instagram did not have a comment. In congressional testimony last month, Antigone Davis, Facebook's global head of safety, disputed the premise that Instagram harmed teenagers, pointing to research that showed they had positive experiences on the app.

Facebook, which was initially aimed at college students, has long depended on young audiences. By law, its users have to be 13 or older. The Children's Online Privacy Protection Act of 1998 makes it illegal to store or collect personal information for anyone younger than 13.

In 2013, David Ebersman, then Facebook's chief financial officer, warned that the company's daily users had declined, "specifically among younger teens." After Facebook's share price plunged on the comment, Sheryl Sandberg, the chief operating officer, said the reaction to Ebersman's remark had been "blown out of proportion."

That same year, Zuckerberg tried — and failed — to buy Snapchat to increase Facebook's appeal with young users. So the company decided to attract youths with apps it already owned, like Instagram, two people with knowledge of the decision said. In 2016, Instagram copied a feature of Snapchat known as Stories, which lets people take videos and photos and post them as 24-hour temporary status updates.

In a July 2017 presentation reviewing a marketing campaign for Instagram's Stories feature, the app found that college-age students had been fastest to use Stories, while 15- to 19-year-olds were second. But 13- to 15-year-olds "did not respond," the document said.

"We have more work to do to break through with younger teens," the document said.

The interest in younger teenagers raised questions internally. In 2017 and early 2018, three employees said, some of Instagram's workers asked whether ad campaigns aimed at 13-year-olds might inadvertently pull in children as young as 11.

Facebook knew that an ad intended for a 13-year-old was likely to capture younger children who wanted to mimic their older siblings and friends, one person said. Managers told employees that Facebook did everything it could to stop underage users from joining Instagram, but that it could not be helped if they signed up anyway.

In September 2018, Kevin Systrom and Mike Krieger, Instagram's founders, left Facebook after clashing with Zuckerberg. Mosseri, a longtime Facebook executive, was appointed to helm Instagram.

With the leadership changes, Facebook went all out to turn Instagram into a main attraction for young audiences, four former employees said. That coincided with the realization that Facebook itself, grappling with data privacy and other scandals, would never be a teen destination, the people said.