Popular secure messaging service Telegram loses battle with Russian courts and now must hand over encryption keys or face being blocked from the country.

Russia’s top court ruled Tuesday that the Telegram messaging service, with 9.5 million active Russian users, must hand over encryption keys to authorities.

The Britain-based messaging app company, with 100 million global users, now has 15 days to provide communications regulators in Russia with the encryption keys to decode Telegram messages. Doing so would put Telegram in compliance with an anti-terrorism rule signed into a 2018 law that requires messaging services to provide authorities a means to decrypt a user’s correspondence.

Pavel Durov, Telegram’s founder, told Bloomberg news that his company plans to appeal the ruling, which could drag the process out deep into the summer months.

Threats to block Telegram unless it gives up private data of its users won't bear fruit. Telegram will stand for freedom and privacy. — Pavel Durov (@durov) March 20, 2018

In a tweet sent Tuesday, Durov wrote, “Threats to block Telegram unless it gives up private data of its users won’t bear fruit. Telegram will stand for freedom and privacy.”

Russia’s Federal Security Service (FSB) argues that possessing the encryption keys is not a violation of a user’s privacy. It’s only under court order that those keys can be used to access encrypted content.

Ramil Akhmetgaliev, a lawyer representing Telegram, told reporters after Russia’s Supreme Court hearing forcing the company to hand over keys: “The FSB’s argument that encryption keys can’t be considered private information defended by the Constitution is cunning. It’s like saying, ‘I’ve got a password from your email, but I don’t control your email, I just have the possibility to control.'”

The Russian state communications agency has been at odds with Telegram ever since it accused the messaging platform of being an instrumental communication tool used by terrorists. They claim Telegram was used by terrorists who plotted a suicide-bomb attack in St. Petersburg in 2017 that killed 15.

In a previous attempt by the Russian government in 2017 to force Telegram to hand over decryption keys, the company declined and was required to pay a $14,000 fine. The case had been under appeal. But on Tuesday Supreme Court Judge Alla Nazarova rejected that appeal.

Durov, himself is a Russian expatriate, said he was first asked in September by the FSB to hand over the encryption keys and refused, according to reports from the TASS news agency. In October, he released a statement that said the FSB’s requests are “technically impossible to carry out” and breached the Russian constitution, which allows citizens to have private correspondence.

The Telegram messaging app has been linked to several high-profile crimes such as the murder of a a priest in Normandy by IS radicals. And in Spain, authorities said a man suspected of plotting an IS-inspired attack in Columbia used the service to send messages.

If Telegram doesn’t comply, the app could eventually be blocked in Russia. China blocked Telegram in 2015.

Telegram data numbers come from Mediascope, which estimates that Telegram has 9.5 million users located in Russia and 100 million users globally.