Pavel Durov, the Russian enfant terrible who created Telegram, the notorious messaging app, is not easily pegged. French authorities arrested him last week, claiming that he allowed Telegram to be used in myriad alleged cyber-crimes, including child sex abuse. Is he a Russian Mark Zuckerberg or a criminal with a flair for tech? His encrypted app made him a hero of the anti-Putin opposition in Russia, but he might also be a collaborator with the Kremlin, since Putin hasn’t yet put him in jail, although the Kremlin has denied making any deals with him. It’s possible Pavel Durov is all of the above.

Pavel, whom I knew as “Pasha” when he was a classmate at St. Petersburg State University, is the son of Valery Durov, who was the charismatic head of the Classical Philology Department. His father’s lectures on Roman literature and Latin case syntax have produced some of the most insufferable students at St. Petersburg University, much like the characters in Donna Tartt’s The Secret History.

Young Pavel and a friend.

After spending part of his childhood in Turin, where his father was a guest lecturer, Pavel returned to Russia to attend Saint Petersburg’s top prep school—and graduated with honors. His classmates say that to do so, Pavel didn’t shy away from cheating on exams. At that school, Pavel befriended Vyacheslav—son of Mikhael Mirilashvili, known as “Saint Petersburg’s Al Capone,” a man who essentially owned the city in the 90s and had numerous dealings with its then deputy mayor, Vladimir Putin.

His first Web site, Durov.com, was branded as a resource for students in the Philology Department and became a go-to tool for those seeking a degree without much effort. It offered lectures, cliff notes, cheat sheets, and, most importantly, exam answers.

His next venture, the university-wide forum SPBGU.ru, rapidly emerged as our primary hub for fights, gossip, and news, and soon gained recognition as the largest and most technologically advanced student Web site in Russia.

His encrypted app made him a hero of the anti-Putin opposition in Russia, but he might also be a collaborator with the Kremlin.

Soon after, Pavel organized the forum’s first beauty contest—a somewhat unsettling event where the dean of the Philology Department, dressed in a tuxedo, presided over a jury of faculty members, along with Pavel himself. They judged female contestants based on their “plasticity,” acting skills, general knowledge of philology, and public speaking. The contest quickly became a hit, and Pavel’s popularity with the ladies soared.

In his first interview—given to the student newspaper that I helped edit—Pavel outlined his next project: “It’s going to be a directory of students and alumni from elite Russian universities, designed to help friends stay in touch. It will allow you to learn more about your current classmates and reconnect with those you’ve lost contact with.”

Essentially, Pavel was describing the functionality of Facebook—a relatively little-known Web site at the time. With financing from his old schoolmate Vyacheslav Mirilashvili, Pavel launched VKontakte (InTouch) in 2006. It became Russia’s definitive social network, offering perks that Facebook users could only dream of—most notably, file sharing.

Sure, VKontakte gave you the ability to connect with friends, but it also allowed you to stream any film or TV show or listen to any song—for free. Even if something was considered off-limits, like Danger Mouse’s Grey Album, a clever mash-up of the Beatles’ White Album and Jay-Z’s Black Album that the respective copyright holders banned—all you had to do was type its name and voilà.

Durov’s 2011 page on Vkontakte, the Facebook-like social network he created.

Vkontakte had tens of millions of users, but at its core it embodied Pavel’s idea of digital anarchy.

Unsurprisingly, while the Russian government was initially indifferent to the rampant copyright infringement, it was far less tolerant of the platform’s anarchic nature. Pressure soon mounted on Pavel to grant the security services access to the platform, a demand he resisted. All too predictably in Putin’s Russia, Pavel was forced to sell Vkontakte in 2014 to a consortium of oligarchs linked to the Kremlin, after which he quickly left the country.

Today, Vkontakte is the most heavily monitored platform on the Russian-language Internet, where even a direct message can result in imprisonment for “discrediting the army” or insulting Vladimir Putin. Pavel’s next project, the Dubai-based Telegram, solidified his billionaire-free-speech-absolutist reputation, forever changed the Russian media landscape—and eventually landed Pavel in a French jail.

All too predictably in Putin’s Russia, Pavel was forced to sell Vkontakte to a consortium of oligarchs linked to the Kremlin.

Telegram was one of the first messaging apps to offer end-to-end encryption through its Secret Chats feature—something indispensable for those living in authoritarian states. In an interview he gave to Tucker Carlson earlier this year, Pavel said that the idea for creating Telegram came to him while he was still based in Russia, during a highly stressful situation. “At one point, armed police officers came to my house and tried to break in because I had refused to take down opposition groups, as I mentioned earlier. That’s when I realized that there were no secure means of communication.”

In Russia, its functionality was unrivaled, and Telegram quickly became the place to criticize Putin without fearing repercussions and, most importantly, get news.

Telegram became an unbeatable tool for evading government scrutiny. Soon, hundreds of anonymous channels emerged—some with audiences exceeding a million people—where information and disinformation were leaked without any oversight, delivered instantly from author to reader.

Demonstrators brandish an icon of Telegram co-founder Pavel Durov, to protest the blocking of his messaging app in 2018.

It’s no surprise that the Kremlin was outraged, and in 2018 it tried to block Telegram—unsuccessfully. Pavel and his brother, Nikolai—the tech brains behind the operation—enmeshed the messenger in a sea of obscure Internet protocols, making it impossible for the Kremlin to block the app without shutting down access to Gmail, vital government Web sites, and food-delivery apps.

Pavel repeatedly asserted that he has no dealings with the Russian government—or any government, for that matter. He publicly mocked the Russian security services when they demanded access to the app’s encryption keys, sending the head of the security services two iron keys in the mail.

Pavel quickly became known as the man who stood up to the Kremlin—a Russian hero. However, anarchy has a dark side, and anti-government content wasn’t the only thing shared on Telegram. According to French prosecutors, it also became the go-to app for the world’s drug dealers, shady crypto-traders, and those trading in child-sexual-abuse materials.

Since the start of the full-scale invasion of Ukraine, Telegram has added hundreds of millions of users and become indispensable for Russian “military bloggers” (war reporters/propagandists) to share news from the front lines, as well as for the Russian Army, which uses this commercially available messaging app to coordinate artillery strikes on Ukrainians. Kyiv also uses Telegram to share news and Zelensky’s daily addresses to the nation.

In addition, it is the C.I.A.’s platform of choice for recruiting (and trolling) members of the Russian security services. On its official Telegram channel, “Securely Contacting CIA,” Langley posts sleek, Amazon Prime–like commercials aimed at encouraging Russians to spy for the U.S. The slogan: “People around you may not want to hear the truth. We do.”

After the January 6 attack on the Capitol, Pavel told Carlson that he received a letter from U.S. congressmen demanding all data on the participants of the insurrection. After consulting with his lawyers, Pavel was advised to “ignore it.”

Telegram is also the C.I.A.’s platform of choice for recruiting (and trolling) members of the Russian security services.

The case against Pavel is almost unprecedented in that it accuses the founder of a social network of being complicit in crimes committed with the help of that very platform. Pavel’s adherence to “neutrality” and libertarianism may make him a hero to some and a criminal to others. Elon Musk has voiced his support. Russians—both liberals and pro-Putin supporters—are calling for his immediate release, the first time that Russian propagandists and liberals in exile have agreed on anything since the invasion of Ukraine.

Before his arrest, Pavel was turning into a stereotype of a libertarian tech billionaire, sharing tips on how to achieve his level of success (no alcohol, no smoking, no red meat, and an intense exercise regimen) and claiming that he has more than 100 children.

Durov, a co-founder of Telegram, the messaging app.

However, his image as a fighter for free speech against all governments took a hit when the Russian investigative outlet iStories.media accessed an F.S.B. database containing records that appeared to show that Pavel visited Russia 50 times in the past nine years—most recently in October 2021—without being arrested. This seems unusual in a country that jails people for calling its war a “war” rather than a “special military operation.”

Pavel, who had mocked the F.S.B., fought the Kremlin, and held the keys to Russia’s No. 1 information network, had claimed that he hadn’t been to Russia in a decade. Does the travel record suggest that Pavel—and, by extension, Telegram—has some kind of arrangement with the Russian government? Perhaps the French investigation will uncover the truth.

Whatever the outcome of his trial, it’s hard to ignore that Pavel’s interpretation of freedom, as reflected in his many projects, encompasses the freedom to commit crimes. Long ago, a student’s post on Durov.com captured the essence of Pavel’s legacy: creating tools that are not just useful but incredibly effective for bending—or outright breaking—the rules:

Oh, great Durov! I have no idea what you look like, who you are… BUT… for the third exam in a row, while not even studying at your University, I’m passing thanks to you!!! Durov.com is saving the world!!! THANK YOU.

Andrew Ryvkin is a screenwriter, journalist, and Russian-affairs specialist