A Facebook notification on Gary Bernhardt's phone woke him up one night last November with incredible news: a message from Mark Zuckerberg himself, saying that he had won $750,000 in the Facebook lottery.
"I got all excited. Wouldn't you?" said Mr. Bernhardt, 67, a retired forklift driver and Army veteran in Ham Lake, Minn. He stayed up until dawn trading messages with the person on the other end. To obtain his winnings, he was told, he first needed to send $200 in iTunes gift cards.
Hours later, Mr. Bernhardt bought the gift cards at a gas station and sent the redemption codes to the account that said it was Mr. Zuckerberg. But the requests for money didn't stop. By January, Mr. Bernhardt had wired an additional $1,310 in cash, or about a third of his social-security checks over three months.
Mr. Bernhardt eventually realized that he had been the unwitting victim of a scam that has thrived on Facebook and Instagram by using the sites' own brands — and its top executives — to lure people in. At a time when the real Mr. Zuckerberg has vowed to clean up Facebook, the Silicon Valley company has failed to eliminate impostor accounts masquerading as him and his chief operating officer, Sheryl Sandberg, to swindle Facebook users out of thousands of dollars.
An examination by The New York Times found 205 accounts impersonating Mr. Zuckerberg and Ms. Sandberg on Facebook and its photo-sharing site Instagram, not including fan pages or satire accounts, which are permitted under the company's rules. At least 51 of the impostor accounts, including 43 on Instagram, were lottery scams like the one that fooled Mr. Bernhardt.
The fake Zuckerbergs and faux Sandbergs have proliferated on Facebook and Instagram, despite the presence of Facebook groups that track the scams and complaints about the trick dating to at least 2010.
A day after The Times informed Facebook of its findings, the company had removed all 96 impostor Mark Zuckerberg and Sheryl Sandberg accounts on its Facebook site. But it had left up all but one of the 109 fakes on Instagram.
"Thank you so much for reporting this," said Pete Voss, a Facebook spokesman. He could not say why Facebook had not spotted the accounts posing as its top executives, including several that appeared to have existed for more than eight years. "It's not easy," he said. "We want to get better."
Facebook requires people to use their authentic name and identity. Yet the company has estimated that perhaps 3 percent of its users — as many as 60 million accounts — are fake. Some of those accounts are disguised as ordinary people, some pretend to be celebrities such as Justin Bieber.
In congressional testimony this month, Mr. Zuckerberg said Facebook was improving its software to automatically detect and remove such accounts. Facebook officials have said the company blocks millions of fake accounts trying to register each day and analysts said the social network has improved its efforts to remove the accounts.
"Fake accounts, over all, are a big issue, because that's how a lot of the other issues that we see around fake news and foreign election interference are happening as well," Mr. Zuckerberg told lawmakers, adding that Facebook is hiring more people to work on reviewing content.
But major holes remain. Interviews with a half-dozen recent victims — and online conversations with nine impostor accounts — showed that the Facebook lottery deception is alive and well, preying particularly on older, less educated and low-income people.
The Mark Zuckerberg and Sheryl Sandberg impostor accounts typically use the executives' pictures as profile photos and list their Facebook titles. Some post manipulated images of people holding oversize checks. The names of Mr. Zuckerberg and Ms. Sandberg are sometimes misspelled, or use parentheses and middle names (Elliot for Mr. Zuckerberg and Kara for Ms. Sandberg) to evade Facebook's software.
Many of the impersonators had dozens to hundreds of followers; several had thousands. They are aided by a network of other sham accounts with generic names, such as Jim Towey and Mary Gilbert, which purported to be "Facebook claim agents."
The scammers seek victims who, based on their Facebook and Instagram profiles, seem vulnerable, said Robin Alexander van der Kieft, who manages several Facebook groups that track the scams. The various fake accounts share information about successful shakedowns and continue pouncing on those victims, he said. He has traced many of the internet protocol addresses of these fake accounts to Nigeria and Ghana.
The pitch often begins with an unsolicited "Hello. How are you doing?" on Facebook or Instagram. The fake accounts then proceed, sometimes in broken English, to inform people of their enormous Facebook lottery prize.
After several messages between The Times and a fake Sheryl Sandberg account on Instagram last week, the impostor offered $950,000 and a new car via the "Facebook splash promotion 2018."
When asked for proof the account was Ms. Sandberg, the scammer sent a Photoshopped identification. "I want you to know that this Promo is 100% Real and Legitimate and the Government are aware of this Promo you don't have to be skeptical all you just have to do is to follow all instruction giving to you okay," the account added.
Three days later, the account said it needed a $100 iTunes gift card to process and activate the winning A.T.M. card. (iTunes gift cards can quickly be redeemed and traded on the black market for cash.)
After initially resisting, the sham Ms. Sandberg agreed to a phone call, adding "I'm not the one that will be speaking to you O.K." Seconds later, a call arrived from a number with a 650 area code — Silicon Valley.
"You have to be careful, there are lots of scam artists," a man said in accented English after he was informed that he was speaking with The Times. He added, "All I'm trying to do is get your winning package."
The Times reached out to more than 50 impostor accounts. Most messages went unreturned. None that replied broke character.
The charade has ensnared people like Donna Keithley, 50, a stay-at-home mom with four children in Martinsburg, Pa. In March 2016, an account with the name Linda Ritchey messaged Ms. Keithley "on behalf of the Facebook C.E.O Mark Zuckerberg" to pass on word of her good fortune: $650,000 in lottery winnings. Ms. Keithley wired $350 — a delivery fee — the next day.
That began a monthlong saga. According to a 28,000-word transcript of a Facebook Messenger conversation between Ms. Keithley and the account, the scammer repeatedly played on Ms. Keithley's Christian faith to get her to send more money.
"Are you good Christian with god fears?" the Linda Ritchey account asked. "Can you trust me and also have believe in me?"
Over the next month, Ms. Keithley received not only Facebook messages but a call from a Mr. Zuckerberg impostor who assured her the lottery was real. She even heard from a Facebook account masquerading as Eileen M. Decker, the former United States attorney in Los Angeles, asking for $205 to process her winnings.
The Times found at least five Facebook accounts posing as Ms. Decker and advertising government grants, another known scam. Ms. Decker told The Times that she has tried to get Facebook to remove the accounts, but the site wanted a picture of her government-issued identification to do so. She refused. "To me, they're not a trusted source," she said. She added that she had contacted the F.B.I. and hired a lawyer.
Ms. Keithley's scammer ordered her to open new credit cards and bank accounts, and even to get a loan using her husband's 2001 Ford Taurus as collateral. Midway through the month, she said she had a minor stroke from the stress.
By April 2016, she had used her family's tax refund and loans from relatives to pay the scammer $5,306.43 — much of it in money transfers to the name Ben Amos in Lagos, Nigeria.
"It just devastated the whole household," said her husband, Tim Keithley, a security guard who was making $10 an hour at the time.
The ordeal was so costly, Ms. Keithley said, the family's telephone service was shut off. They also had to go to a food bank.
While Ms. Keithley still gets messages from accounts claiming to work for Facebook, she said she is now wiser. "Lord as my witness, no one's getting any more money from me," she said.
After they are duped, victims may struggle with what to do next. Mr. Bernhardt, the retired forklift driver, said he didn't know how to report the scammers to Facebook. Ms. Keithley said she had called a number for Facebook she had found online, though she was not sure the number was authentic. She also reported the scam to local police, who said they couldn't help, and the Pennsylvania attorney general, who she said didn't respond.
Others said they regularly report scammers to Facebook, but the company can be slow to act.
Kathryn Schwartz, 55, from Lodi, N.J., said she has been in credit-card debt since she lost $1,742 trying to claim bogus Facebook lottery winnings in 2016. She said she has since been barraged by scammers and regularly reports them, including in messages to the real Mr. Zuckerberg.
One Facebook account named Mary Williams recently messaged Ms. Schwartz, saying it would help her claim her winnings. A review of the account showed that in March it had renamed itself, purporting to be a Boise, Idaho, native who works at Facebook. Years of posts before that depicted a man in Nigeria.
When Ms. Schwartz posted on Facebook last week that Mary Williams was a con artist, the account left a comment: "You think you are smart but you are not. If you were smart why were you scammed". The emojis tacked at the end of the message were crying with laughter.
Mr. Bernhardt said that since he wired his last payment to the Mr. Zuckerberg masquerader in January, he has heard from two other Mark Zuckerbergs, one Sheryl Sandberg and other accounts promising him winnings in return for more cash.
No conversations have gone as deep as with his original scammer. "I thought we were getting real close," Mr. Bernhardt said. "He started calling me Mr. Gary and I started calling him Mr. Mark."
He said he had told his scammer about growing up in a foster home and his dream of owning a house on a lake.
"They sucked me in because they knew my dreams," he said.