Paul Whelan, a former U.S. marine, who was arrested for alleged spying in Moscow at the end of 2018, speaks while standing in a cage while waiting for a hearing in a court room in Moscow, Russia, Friday, Aug. 23, 2019. (AP Photo/Alexander Zemlianichenko)

MOSCOW (AP) — A Moscow court has ruled to keep an American man suspected of spying in prison for two more months.

The court ruled on Friday to keep Paul Whelan behind bars at least until late October. Whelan, who is reportedly kept in cramped conditions at a Moscow detention facility, felt unwell, and the court called an ambulance. Paramedics, however, said he doesn't require hospitalization. The U.S. Embassy last month said Whelan's condition has worsened.

Whelan, who also holds British, Irish and Canadian citizenship, was arrested in a hotel room in Moscow in December last year and charged with espionage, which carries up to 20 years in prison. He has publicly complained of poor prison conditions and has said his life is in danger.

Paul Whelan, a former U.S. marine, left, who was arrested for alleged spying in Moscow at the end of 2018, is escorted by Federal Security Service officers to a court room in Moscow, Russia, Friday, Aug. 23, 2019. (AP Photo/Alexander Zemlianichenko)
Paul Whelan, a former U.S. marine, who was arrested for alleged spying in Moscow at the end of 2018, stands in a cage while waiting for a hearing in a court room in Moscow, Russia, Friday, Aug. 23, 2019. (AP Photo/Alexander Zemlianichenko)
Paul Whelan, a former U.S. marine, second left, who was arrested for alleged spying in Moscow at the end of 2018, speaks to a journalist as he escorted by Federal Security Service officers to a court room in Moscow, Russia, Friday, Aug. 23, 2019. (AP Photo/Alexander Zemlianichenko)
Paul Whelan, a former U.S. marine, who was arrested for alleged spying in Moscow at the end of 2018, stands in a cage while waiting for a hearing in a court room in Moscow, Russia, Friday, Aug. 23, 2019. (AP Photo/Alexander Zemlianichenko)
Paul Whelan, a former U.S. marine, who was arrested for alleged spying in Moscow at the end of 2018, stands in a cage while waiting for a hearing in a court room in Moscow, Russia, Friday, Aug. 23, 2019. (AP Photo/Alexander Zemlianichenko)