MOSCOW—Former U.S. Marine Paul Whelan, who is facing up to 20 years behind bars here on charges of espionage, had a very sad Christmas week: on Tuesday, a Moscow court extended his detention for three more months pending some eventual but as yet unspecified trial date, and this Saturday will mark the one year anniversary of his incarceration.

As for December 25—the date Christmas is celebrated in the West—Whelan may well have reflected on the dinner he had on Christmas one year ago in a chain restaurant in Moscow with a couple of Russian friends. He posted a photo of them on the Russian social media site Vkontakte captioned with one word: “Tovarishi,” comrades, harking back to Soviet times.

But Whelan now believes that one of those tovarishi was a Judas who set him up to be arrested as a spy.

There is a full name connected to the man, but when The Daily Beast has called multiple numbers that he gave to Whelan there has been no answer, and we don’t even know that the name was genuine. So let’s just call him Ilya Tovarish.

Whelan tells his family that this man he has known for a decade framed him by bringing a USB stick to his hotel room with allegedly incriminating material on it. Whelan says he believes his friend was or is “an employee of the FSB,” the Russian Federal Security Service that succeeded the KGB after the collapse of the Soviet Union, but is still full of comrades fighting the 21st century version of the Cold War.

The Daily Beast was not able to confirm the nature of Mr. Tovarish’s connection with the FSB apart from Whelan’s brother’s claims that he said he graduated from the FSB academy.

What is unquestioned is that last December, the FSB detained Whelan in his room at the luxurious Metropol Hotel in the heart of Moscow. The investigators found him in possession of the incriminating thumb drive, which he said he had never had a chance to look at before the government agents moved in. He has told his lawyer and the court he thought it was nothing but tourist photos from a trip he had taken with this “friend.”

“ As Paul Whelan moved into the world of private security, he also began trying to develop contacts in Russia, whose intelligence gathering and special operations forces are admired by many Americans. ”

David Whelan tells The Daily Beast that a few weeks ago his brother sent him a handwritten note from Moscow’s notorious Lefortovo prison naming this Mr. Tovarish as “the culprit.”

David says Paul does not regard this as a suspicion but as an incontrovertible fact. “The only thing we don’t know,” said David, “is why Ilya betrayed Paul.”

The FSB previously reported that Paul Whelan had been caught “during an espionage operation.” Some Russian news articles said the thumb drive had photographs of a major Orthodox church on it, others that Whelan had been gathering information about “classified military structures . ”

To be sure, Paul Whelan’s background is unusual. A Michigan resident, he has U.S., Canadian, Irish and British passports. In 2008 Whelan was given a bad conduct discharge from the Marine Corps because of alleged larceny, according to Pentagon records. He had served with the Marines from 1994 until 2008, taking multiple tours to Iraq in 2004 and 2006 as an administrative clerk and an administrative chief.

“ Life is tough but so are we. ” — Vladimir Zherebenkov, Paul Whelan's lawyer

But as Paul Whelan moved into the world of private security, he also began trying to develop contacts in Russia, whose intelligence gathering and special operations forces are admired by many Americans.

Over the years, Whelan’s family heard a lot from Paul about Mr. Tovarish. They were told of his education at the FSB school in the town of Tver, about his parents’ house with a banya (Russian sauna) and a large garden, even the name of his dog. All these details Paul Whelan described to his family in emails and on social media posts from 2009 to 2018.

In one of the pictures taken a decade ago Paul Whelan is hugging a slim young man with dark hair, whom he refers to as Ilya; in the other, taken in the winter of 2018, Paul is posing on thick snow with a big dog. It was Ilya’s dog, Sultan, Paul Whelan said in an email addressed to his family. There is also a picture of the same man happily smiling over a glass of red wine.

Paul had visited Ilya multiple times in a village near the town of Sergiyev Posad, his brother David told The Daily Beast.

Both brothers, Paul and David Whelan, shared an interest in Russian history and culture. Their parents have also traveled around Russia, including a visit to the major monastery Trinity Lavra of St. Sergius near Sergiyev Posad.

But is there a case against Paul Whelan?

His lawyer, Vladimir Zherebenkov told The Daily Beast that Whelan “has been in fact framed by his friend,” but did not use the name of the Judas, saying only that he was “a friend who lives near Sergiyev Posad.”

Zherebenkov said that U.S. officials are doing a lot to help Whelan. “I had a two hour long sit down with senior diplomats from Washington at the American embassy recently; we discussed my line of defense for Paul, ways of providing him with medical aid,” Zherebenkov said.

Why did Paul Whelan make friends with an FSB officer, if such he was? David Whelan told The Daily Beast that he did not see anything unusual about his brother making friends with someone from state security. His brother had made friends with police and security officers for decades.

“Paul and I backpacked through Europe during high school. On that trip he frequently stopped at police departments and spoke with cops. He became a cop,” David said. “Ilya was not even the only FSB person Paul knew, it certainly didn’t strike any of us as odd.”

On Tuesday, the court closed the hearing for the public, so Whelan would not speak out to journalists about his case. “Life is tough but so are we,” Zherebenkov told The Daily Beast. “I have appealed the decision today. … Only one dubious witness says he was a spy, but all the other witnesses insist he was a good man.”