A Turkish court on Monday rejected lawyers' requests for two Greek soldiers arrested in Turkey to be released from custody.

The two were arrested last week for allegedly entering a Turkish military zone and on suspicion of attempted espionage. Greece said the two soldiers - a lieutenant and a sergeant - accidentally strayed into Turkey due to bad weather during a patrol of the Greek-Turkish border.

The development has added further tensions to already strained ties between the NATO allies.

Lawyers for the two Greek soldiers filed a demand Monday for their release at the court in the northwestern Turkish city of Edirne. The court however, ruled that they must remain in custody on grounds that they did not have permanent residence in Turkey and because the court was still examining the "digital data" seized from them, the state-run Anadolu Agency reported.

Family members of the two soldiers were able to visit them in jail Monday.

"Turkey must observe procedures prescribed by international law, and not turn a routine incident into a big political and legal issue," he said.

A river marks most of the Greek-Turkish border, while a fence runs along much of the land section. However, some parts aren't clearly marked.

Relations between neighbors Greece and Turkey have soured in recent weeks over longstanding disputes about boundaries in the Aegean Sea and natural gas drilling rights off the coast of war-divided Cyprus.

Last month, a Greek coast guard vessel was rammed by a Turkish patrol boat off disputed islets in the east Aegean, and Turkish warships prevented an exploratory gas rig from drilling near Cyprus.

Turkey meanwhile, is angered by court decisions in Greece rejecting the extradition of eight Turkish servicemen wanted by Ankara for their alleged involvement in a failed military coup in 2016. The eight deny any involvement in the failed coup, and Greek courts have ruled they would be at risk of not receiving a fair trial if returned to Turkey.

Turkish Deputy Prime Minister Bekir Bozdag rejected speculation that Ankara could use the Greek soldiers' arrest to secure the extradition of the eight Turkish soldiers.

"The arrest of the two soldiers in Turkey is not the subject of a swap," Bozdag said. "Neither the Greek government nor the Turkish government have made a request for a swap."