Armenia’s National Security Service (NSS) said on Monday that it is investigating possible links with “terrorist groups” of six Bangladeshi men who were detained while crossing into the country from Azerbaijan last week.

The Armenian Defense Ministry reported the detentions on May 8. It said the men were spotted and caught by its troops deployed on the heavily mined Armenian-Azerbaijani border before being handed over to the NSS.

An NSS statement said the Bangladeshis entered Armenia from Azerbaijan’s Nakhichevan exclave, which also borders on Iran and Turkey, under the cover of darkness.

“The individuals in question have testified that for the purpose of finding work they intended to cross into Turkey through Iran but lost their way and accidentally found themselves in Armenia,” it said.

The security agency said it is now taking “investigative actions to establish the identity of the individuals and verify the credibility of their testimonies, real motives for the border crossing as well as their links with extremist and terrorist groups.”

The NSS statement added that the detainees have so far been charged only with illegally crossing Armenia’s border. All of them are now under arrest pending investigation, it said.

The Armenian-Azerbaijani frontier has long been closed because of the Nagorno-Karabakh conflict. It is tightly guarded by the armed forces of the two neighboring states.