Ivan Safronov (right), adviser to the Roscosmos State Corporation General Director, remanded in custody for two months on suspicion of treason, leaves a hearing at Moscow's Lefortovsky District Court.

Russia has arrested a former journalist on a charge of high treason for allegedly passing military secrets to a NATO government in what some are calling a clear attack on press freedoms.

Ivan Safronov Jr., who since May has been working as an adviser to the chief of Russia's state space agency Roskosmos, was detained and searched by armed officers of the FSB security service outside his Moscow apartment on July 7 before being taken to court, where he entered a not guilty plea. The court ordered him held behind bars until September 6.

Prosecutors accuse him of passing information to the Czech Republic in 2017 about the sale of Russian arms to the Middle East and Africa, his lawyer Ivan Pavlov said. Safronov was working as a journalist at the time covering issues related to the activities of Russia's military industrial sector. Russia claims the United States was the final beneficiary of the information, Pavlov said.

Safronov could face up to 20 years in prison, if convicted.

His arrest -- the latest in a series of law enforcement actions against Russian journalists and researchers -- sparked outrage among former colleagues and prompted dozens to protest outside the FSB headquarters in Moscow.

"The experience of the last few years shows that any citizen of Russia whose work is connected with public activities -- whether it is a human rights defender, scientist, journalist, or employee of a state corporation -- can face a serious charge at any time," Kommersant, the newspaper where Safronov worked for a decade until last year, said in a statement on its website.

Kommersant called Safronov a "true patriot of Russia" and said the FSB allegations were "absurd." It also called on prosecutors to make the case as open to the public as possible, saying it's hard for people accused of treason in Russia to get a fair trial.

Andrei Soldatov, a respected journalist who has written extensively about Russia's security services, called Safronov's arrest "a new level of repression" against reporters.

"I can only think of one reason why this is happening - we are being told what other topics of importance for society are now off limits for all except 'for those who should know,'" he said in a Facebook post.

Kremlin spokesman Dmitry Peskov denied Safronov's arrest was linked to his work as a reporter.

"He is accused of high treason, of passing secret data to foreign intelligence. As far as we are informed, the detainment has nothing to do with the journalistic activities Safronov was involved with in the past," Peskov said.

Pavel Chikov, a top human rights lawyer whose organization, Agora, provides legal support to Russians detained in politically motivated cases, wrote on Telegram that police also searched the apartment of journalist Taisia Bekbulatova, who is believed to be close to Safronov.

According to Chikov, after the search she was questioned as a witness in an unspecified case along with her lawyer Nikolai Vasilyev.

TASS and Interfax both quoted unidentified sources as saying Bekbulatova is being questioned as a witness in the Safronov case.

As a journalist, Safronov mainly covered issues related to the activities of Russia's military industrial sector, including an accident last year on an atomic submarine and the nation's military exercises.

His father, Ivan Safronov Sr., also worked for Kommersant, focusing mainly on the military industrial complex's operations.

Safronov Sr. died at the age of 51 after he mysteriously fell out of a corridor window in his apartment block in Moscow in 2007. Police concluded the death was a suicide, though relatives and friends say they suspect foul play.

Safronov Jr. was fired from Kommersant in May 2019 after writing an article about the possible resignation of Valentina Matviyenko, the chairwoman of the Russian parliament's upper chamber. Matviyenko continues to serve as its chairwoman.

Safronov's firing led to a crisis at the paper after all of the journalists in Kommersant's politics department resigned in protest. He soon joined Vedomosti, then the nation's leading business newspaper, before quitting following an ownership change that installed a Kremlin-friendly chief editor.

In June 2019, media reports surfaced saying that Kommersant might face administrative lawsuits for making state secrets public.

It was not clear which state secrets had been made public, but one of Safronov's articles about Russia's plans to deliver Su-35 military planes to Egypt was removed from the newspaper's website.

At the time, U.S. State Secretary Mike Pompeo warned of possible sanctions against Egypt if Cairo purchased the planes from Moscow, The Bell website said.

Kommersant Director General Vladimir Zhelonkin told the Open Media group on July 7 that there were no issues with authorities related to Safronov's article published last year in his newspaper, adding that the article in question did not contain any data that might be classified as a state secret.

Following Safronov's detainment on July 7, more than 20 journalists were held by police as they staged single-picket protests in front of the Federal Security Service's headquarters in Moscow. They were demanding "transparency, openness, and detailed information" on Safronov's case.

Other journalists continued the single-picket protests, which do not require pre-approval from the authorities.

Safronov's arrest is at least the third of a current or former journalist in the past 13 months that has garnered national attention and raised fears of a further curtailment of media freedom.

Ivan Golunov, an investigative reporter for Meduza, was arrested in Moscow in June on drug charges that were later dropped following street protests.

Police later admitted to planting the drugs on the reporter, who worked on stories about corruption at the highest echelons of the government and security services.

Svetlana Prokopyeva, a freelance contributor to RFE/RL's Russian Service, was found guilty this month of "justifying terrorism" for a commentary she gave to a radio station.

Prosecutors sought a six-year prison term for Prokopyeva, who linked a suicide bombing with the country's political climate.

This article originally appeared on Radio Free Europe/Radio Liberty. Follow @RFERL on Twitter.