SOFIA, Bulgaria (Associated Press) — A specialized court in Bulgaria has opened the trial of three Syrian nationals charged with terrorism offenses.

The men, aged 20, 22 and 25, who had obtained refugee status in Germany, had tried to illegally cross the border with Turkey and had planned to go to Syria to join jihadi groups.

They were caught by Bulgarian border police in the town of Svilengrad in February and eventually sentenced to six months in prison.

The prosecution said it had found photos of militants who were members of the Islamic State group saved in the mobile phones of the accused.

They could face up to 10 years in prison, if found guilty.