A court in Moscow ruled on Tuesday that former U.S. marine Paul Whelan, who is being held in Russia on spying charges, can remain in custody, the Interfax news agency said.