Former U.S. Marine Paul Whelan, who was detained and accused of espionage, speaks inside a defendants' cage during a court hearing to consider an appeal to extend his detention in Moscow, Russia June 20, 2019. REUTERS

Moscow -- A former U.S. Marine held by Russia on espionage charges appealed directly to President Trump on Thursday to help get him out of jail as his detention was ruled lawful by a Moscow court. The court denied Michigan resident Paul Whelan's appeal against a May ruling that granted an extension of his arrest until Aug. 29. The court ruled the extension lawful, meaning Whelan will likely remain behind bars at least until the end of August.

Whelan, who also holds British, Irish and Canadian citizenship, called his arrest an "absurd political kidnap" at the Thursday hearing. He urged the governments of the U.K., Ireland and the U.S. to help him.

"I'm asking government leaders, authorities -- Ottawa, Dublin, London and Washington -- to help and express public support," Whelan was quoted as saying by the state-run RIA Novosti news agency.

Get Breaking News Delivered to Your Inbox

Addressing Mr. Trump, Whelan read from a statement: "Mr. President, we cannot keep America great unless we aggressively protect American citizens wherever they are in the world."

Whelan was arrested in a hotel room in Moscow at the end of December and charged with espionage. He faces up to 20 years in prison in Russia.

Whelan's Russian lawyer Vladimir Zherebenkov told CBS News' Elizabeth Palmer outside the court in February when Whelan was arraigned that his client was found at his hotel with a flash drive containing Russian "state secrets." Zherebenkov has maintained that his client was handed the flash drive and didn't know that it contained any classified information.

The lawyer has not explained in detail how Whelan came to be in possession of the information on the drive, but said his client wasn't aware that the Russian government considered the material sensitive. Zherebenkov added that the prosecution did not "have strong evidence to back up the charges" against Whelan.

U.S. intelligence and State Department sources have told CBS News they're confident Whelan is not a spy.

At the hearing in May during which his detention was extended, Whelan complained to reporters of alleged abuse in custody.

"I have been threatened. There are abuses and harassment that I am constantly subject to. There is a case for isolation. I have not had a shower in two weeks, I can't use a barber I have to cut my own hair. I can't have medical treatment, I can't have dental treatment… They are trying to run me down so that I will talk to them," he said.

#PaulWhelan says investigators have threatened him. Yet officials at Lefortovo block human rights defenders from communicating with him about these threats. What are investigators hiding? Read the report here: https://t.co/YV0eEpBcMZ https://t.co/WTkrZpCr5q — Andrea Kalan (@USEmbRuPress) June 5, 2019

Two weeks ago, U.S. Embassy spokesperson Andrea Kalan said prison officials were not allowing human rights advocates to check on Whelan in the Lefortovo prison where he is held.

"Paul Whelan says investigators have threatened him. Yet officials at Lefortovo block human rights defenders from communicating with him about these threats. What are investigators hiding?" Kalan tweeted on June 5.

Whelan worked for a Michigan-based auto parts company from 2017, becoming its global security director. He spent 14 years in the U.S. Marine Corps before being discharged in 2008 for misconduct, according to the U.S. military.