A photo illustration with the logo of Telegram, an encrypted messaging app popular among Russian officials, including at the Kremlin. (Dado Ruvic/Reuters)

Russia’s powerful state security agency said Monday that terrorists used the encrypted messenger app Telegram to plan a deadly attack on the St. Petersburg metro, a disclosure that buttressed lawmakers’ efforts to curb the anonymous use of encoded chat programs popular among jihadists, opposition activists and government officials alike.

The statement by the Federal Security Service (FSB) came as Russia’s lower house of parliament, the Duma, moved forward on several laws targeting anonymity on the Russian segment of the Internet, including a ban on the use of virtual private networks that mask IP addresses. The government of President Vladi­mir Putin is increasingly enforcing legislation demanding that social networks store their information in Russia, blocking the employment site LinkedIn earlier this year in an apparent effort to pressure larger networks such as Facebook to comply with the law.

 Now, the Duma is looking at laws that will ban anonymity on messenger apps, requiring users to register with real names verified through telephone numbers (which in turn are tied to passport data). The Duma has passed a first reading of the bill, despite a government commission’s concerns that the legislation is vague.

The revelations by law enforcement Monday, tying the messenger app to a terrorist attack that rocked Russia’s second-largest city this spring, may speed the passage and enforcement of the law. The bombing of a metro train in the city killed 15 people, including the bomber, and injured at least 45.

 “During the investigation into the terrorist attack of April 3 in St. Petersburg’s metro, FSB received reliable information that the suicide bomber, his allies and his foreign curator used the Telegram messenger to conceal their criminal plot during all the stages of preparation for the terrorist attack,” said the counterterrorism agency, which was once headed by Putin.

It is widely known that terrorist groups, including the Islamic State, use encrypted chat messengers, and specifically Telegram. A 2016 report by the Middle East Media Research Institute noted that Telegram’s strong encryption and flexibility have made it “the app of choice for many ISIS, pro-ISIS and other jihadi and terrorist elements.”

In Russia, where surveillance in politics is rife, the app is also popular among journalists, nongovernmental organizations and opposition leaders. Anonymous “insiders,” claiming to know the inner workings of the Kremlin, spill those secrets daily on several channels on the site.

Telegram is also popular among Kremlin officials. Dmitry Peskov, Putin’s personal spokesman, regularly responds to journalists via Telegram, as do other federal and regional officials.

“If the services of this messenger become inaccessible, we will switch to a different one,” Peskov told journalists Monday when asked about the Kremlin’s use of Telegram. “We’ll see what is more convenient. In this case, there is competition. There is diversity.”  

The furor over Telegram has largely played out in public, with Russian officials from an oversight agency sparring with Pavel Durov, 32, the founder of Telegram and emigre enfant terrible of the Russian start-up scene.

Roskomnadzor, the Russian communications regulator, said Friday in an open letter that it would block Telegram soon if Durov did not register it on an official list of information distributors, making it subject to the bill passing through the Duma.

Durov fired back, saying Telegram has blocked more than 5,000 groups associated with extremism since the beginning of June.

“It will be sad if Russian security services exploit this tragedy as a pretext to strengthen their influence and authority over the population,” he wrote Monday on VKontakte, the social network he created. He left Russia in 2014 after VKontakte was taken over by business interests he said were allied with Putin. 

Separately, Durov rejected calls from Roskomnadzor to share a back door, or “keys,” to the encrypted messages sent through Telegram, saying they do not exist. He also said that other messengers and virtual private networks would allow extremists to avoid the ban. 

“To defeat terrorism through blocking, one must block the Internet,” Durov concluded.  

While Telegram is popular in political circles, it is far from the country’s most popular messenger service. According to 2016 data from the mobile provider Beeline, just 7.5 percent of customers used Telegram, while 68.7 percent used WhatsApp, which is owned by Facebook, and 45.7 percent used Viber, owned by the Japanese company Rakuten.