Apple CEO Tim Cook in Cupertino, Calif., on Sept. 12, 2017. (Marcio Jose Sanchez/AP)

TIM COOK, the chief executive of Apple, has become something of an apostle for privacy and data encryption. Apple’s iMessage system is encrypted end to end, meaning only the sender and user can access the information, which prevents a prying government from looking. “The only way to protect your data is to encrypt it,” Mr. Cook declared recently. “There is no other way known today. And so, if I were you, I would do business with no one that wasn’t doing that.”

The messenger app Telegram is not an Apple product, but it embodies Mr. Cook’s philosophy. Telegram was created by the digital innovator Pavel Durov, a Russian who left the country after he lost control of an earlier social media platform, ­VKontakte. Telegram relies on encryption and has 200 million active users worldwide. It is popular and useful in places with nosy governments, such as Russia and Iran. Recently, Russia demanded that Telegram turn over keys to user data, and Telegram refused. As a result, for roughly a month and a half, Russia’s communications regulator, Roskomnadzor, has been trying to shut down Telegram in the country. So far, Mr. Durov has kept the service alive in a cat-and-mouse contest with the regulators, who blocked huge swaths of the Russian Internet in a failed attempt to catch and crush his app. By standing up against Russia, Mr. Durov appears to be translating Mr. Cook’s advice into action.

It was curious last week to hear from Mr. Durov that the latest roadblock he confronted is at Apple, Mr. Cook’s company. Russia has asked Apple to remove Telegram from its App Store in Russia and to prevent it from sending notifications to Russian users. According to Mr. Durov, since mid-April, Apple has restricted Telegram from updating its app worldwide, a setback that has, among other things, prevented it from meeting the new European data standards.

We understand that Apple is not going to cave in to the Russian thought police. Apple has not removed Telegram from the App Store nor blocked notifications, and on Friday, Apple pushed out an update of Telegram as Mr. Durov requested. We have been critical of Mr. Cook in the past for Apple’s decisions in China, which has made no secret of its invasive surveillance practices and intentions. Mr. Cook has said Apple must follow local laws in the countries where it does business, but others have pointed out that those laws can often be written to serve the needs of authoritarian regimes.

In this case, Mr. Cook has quietly stood on principle and refused to give in to Russia’s demands. This is an important development in the still-unsettled battle over freedom in the digital world. Telegram is an extremely significant test case. If Apple backs up Mr. Durov and resists pressure, as it appears to be doing, others may be encouraged to stand tall as well.

Read more:

The Post’s View: The fight in Russia for Internet freedom is one worth having

Alexey Kovalev: The Russian government just managed to hack itself

The Post’s View: Russia and China take Big Brother to absurd new levels

The Post’s View: Apple and other tech titans should tread carefully in China

The Post’s View: Apple’s strong principles bend to China’s police state