(Reuters) – French researcher Laurent Vinatier pleaded guilty in a Moscow court on Friday to a charge of failing to register as a foreign agent while gathering information on the Russian military, and was placed in custody until Aug. 5.

A short video posted by the Moscow courts service showed Vinatier, in handcuffs, being led into a Moscow courtroom and ushered into a barred metal cage at the start of the hearing.

The 47-year-old is a Russia specialist and adviser to the Centre for Humanitarian Dialogue, a Swiss-based conflict mediation group. He faces a sentence of up to five years.

Under Russian law, a person is obliged to contact the justice ministry and register as a foreign agent if they are involved in political activity and/or collecting military information, and at the same time are receiving financial or other help from abroad.

Vinatier’s lawyer, Alexei Sinitsyn, told Reuters that Vinatier had been able to contact the French embassy in Moscow.

France’s consul general in Moscow Patrice Servantie wrote a letter to the Moscow court asking that Vinatier not be placed in detention – a request that it rejected.

“Mr. Vinatier is a responsible and law-abiding citizen, he will comply with all the requirements of the law of the Russian Federation,” said the letter, which Sinitsyn shared with Reuters.

Servantie did not immediately reply to a Reuters comment request.

Russia has applied the “foreign agent” law widely in the past decade to stifle opposition and discredit opposition figures, journalists and organisations critical of the Kremlin.

French President Emmanuel Macron on Thursday denied Vinatier worked for the French state and described his arrest as part of a campaign of disinformation by Moscow.

(Reporting by Lucy Papachristou and Filipp Lebedev in London and Gabriel Stargardter in Paris; editing by Mark Trevelyan)