Russia’s Federal Security Service (FSB) said encrypted messaging app Telegram, which often finds itself in the midst of controversy, was used by terrorists to plan attacks in the country.

The news comes days after Russian regulator Roskomnadzor threatened to block Telegram if the secure messaging app maker did not provide information about the company which controls it.

According to Russian news outlet RT, if (as required) Telegram officially registers its details with the government, it may have to share user chats with law enforcement services.

The FSB said in a statement that Telegram provided “terrorists with the opportunity to create secret chat rooms with a high degree of encryption”.

It explained that a suicide bomber who attacked St Petersburg in April had used Telegram to coordinate with accomplices.

Telegram founder Pavel Durov (pictured) said on social media the communications regulator had asked his company to allow security services to decrypt user messages, Reuters reported.

He said this not only violated the constitutional rights of users but also was not technically possible.

He hit back by saying that if Russia banned his app, terrorists would simply switch to rivals such as WhatsApp, which also offers end-to-end encryption.

“If you want to defeat terrorism by blocking stuff, you’ll have to block the internet,” wrote Durov.

Earlier, Durov had said US agencies bribed him because they wanted his company to weaken its encryption or install a backdoor.