ATHENS/ISTANBUL (Reuters) - A Turkish court remanded in custody on Friday two Greek soldiers who were detained after crossing the border into Turkey in bad weather in a heavily forested frontier region, Turkish media said, despite Greek calls for their swift return.

Greece said the soldiers had been on a border patrol when they strayed from their route because of the poor weather.

Turkey’s state-owned Anadolu news agency said the soldiers were detained on grounds of attempted military espionage and entering a prohibited military zone. Another news agency, DHA said the court ruled that data on their phones be investigated.

The soldiers told the court that they ended up on the Turkish side after following footprints in the snow and that they meant to send the images they took on their phones to senior officers, Anadolu said.

“We are in consultation with Turkish authorities for a prompt resolution of the matter,” Greek government spokesman Dimitris Tzanakopoulos told reporters earlier. “Legal processes in Turkey will be put in motion swiftly and we expect the return of the two Greeks to our country”.

The incident took place during a normal patrol in the forest area of Kastanies at Evros.

“Yesterday’s incident was the result of a mistake. The two Greek officers diverged from their route because of the bad weather in the area, and found themselves, I repeat, by mistake, in Turkish territory,” Tzanakopoulos said.

Greece’s army command said earlier that from the first moment, Greek authorities were in contact with their Turkish counterparts and that procedures for the soldiers’ return to Greece were ongoing.

Turkish officials were not immediately available to comment.

The two Greeks, a second lieutenant and a soldier, were in good health and were being held in Edirne.

The two NATO partners teetered on the brink of war in 1974, 1987 and 1996 over long-running disputes on ethnically divided Cyprus, mineral rights in the Aegean Sea and sovereignty over uninhabited islets in that sea.

In December, during Turkish President Tayyip Erdogan’s visit to Athens, the two countries agreed to revive a consultation process for confidence-building measures.