A Greek magistrate has ordered two men to remain in custody pending trial on charges of attempting to travel to Syria through Greece to join the Islamic State group.

The suspects' lawyer, Menia Polychroni, says her clients deny any wrongdoing.

The two men, born in Bosnia and Yemen but travelling on Swedish passports, were arrested last week near the Greek-Turkish land border. Police confiscated two knives, a military-style waistcoat and a rifle shoulder strap from their possession.

The suspects, aged 29 and 20, haven't been identified. They have been charged with membership in a terrorist group, arms possession and possessing military equipment with the intent of supplying a terrorist group.

They appeared before a magistrate in the northern town of Alexandroupoli on Tuesday. No trial date was set.