ATHENS, Greece — A Greek investigating judge on Monday ordered nine suspected left-wing militants from Turkey to remain in custody pending trial on terrorism-related charges.

They were arrested last week in raids before a visit by Turkish President Recep Tayyip Erdogan later this week. The eight men and one woman have been charged with terrorism-related offenses, forgery, arms and explosives possession and resisting arrest.

The suspects were arrested on suspicion of links with the Revolutionary People’s Liberation Party-Front, which is deemed a terrorist organization by Turkey, the U.S. and European Union.

Police said searches of their residences uncovered detonators, a handgun and materials that could potentially be used to make explosives.

The nine were driven to the courthouse in central Athens in groups, and were led to the building in handcuffs and wearing white bulletproof vests. Some of the suspects shouted slogans.

The suspects have alleged through their lawyer, Aleka Zorbala, after they were arrested that they had been beaten by police during their arrest and initial detention. Police photos released of the nine showed at least two with visible injuries — one with a black eye and one with a bandaged head.

Erdogan is due to arrive in Athens on Thursday as part of a two-day official visit to Greece.