Russia's Internet watchdog on Tuesday warned Facebook it would be banned in 2018 unless it complies with a law on storing local users' data.
"The law is compulsory for all," the head of Roskomnadzor telecoms watchdog Alexander Zharov told journalists in Moscow, quoted by Interfax news agency.
"We will work on getting Facebook to observe the law," Zharov said. "This will all happen in 2018 definitely."
A controversial law passed in 2014 requires foreign messaging services, search engines and social networking sites to store the personal data of Russian users inside Russia.
The law, which was fiercely opposed by the telecommunications industry, is an apparent move to pressure sites such as Facebook and Twitter into handing over user information.
"In any case we will either get the law carried out or the company will stop working in Russia, as unfortunately happened to LinkedIn," Zharov said.
"There are no exceptions here," he added.
Russian Internet providers last year blocked the LinkedIn professional networking site after Roskomnadzor said it broke the law on personal data storage.
Zharov's comments came after Facebook revealed that Russia-linked fake accounts paid for ads that may have influenced last year's US election.
Facebook said it was sharing its findings with the US authorities.
The threat of a ban also comes as Russia is gearing up for presidential elections in March next year. Facebook is widely used by the opposition to President Vladimir Putin to coordinate protests and make political statements.
Opposition leader Alexei Navalny, who intends to stand against Putin but will almost certainly be barred, uses Facebook to communicate with supporters.
The online platform allows him to bypass state television, which only gives him negative coverage.
"We understand very well that Facebook has a significant number of users in Russia, but on the other hand, we understand that it's not a unique service, there are other social media sites," said Zharov.