JERUSALEM — Israel and Syria have fought several wars, never had diplomatic relations, and still contest the sovereignty of a tract of land, the Golan Heights, that was seized by Israel from Syria in 1967.
But on Thursday, the two countries shared a rare moment of indirect cooperation, participating in a Russian-mediated prisoner swap that saw an Israeli woman held captive by Syria exchanged for two Syrian shepherds captured by Israel, the Israeli government announced early Friday morning.
“Israel has always done and will always do everything in its power to bring our citizens back,” Prime Minister Benjamin Netanyahu of Israel said in a statement.
The woman has not been named. But she is in her 20s, comes from near Jerusalem and has a history of trying to illegally enter Israel’s neighbors, an Israeli official said. She entered Syria by land in early February before being detained by Syrian authorities, who quickly realized that she was a civilian rather than a spy, the official said.
The exact circumstances of her entrance are unclear and will be the subject of an investigation by Israeli officials after her return.
Following mediation by Russia, which is a Syrian ally with a large military presence in the country, the woman was flown to Moscow, the official said. There, she was met on Thursday night by an Israeli team that included a former intelligence officer, Yaron Blum, who has a history of involvement in prisoner exchanges.
Her handover was preceded by the release of two Syrian shepherds who had been captured by Israel after crossing by land into the Israeli-controlled Golan Heights.
The Golan Heights were occupied by Israel during the 1967 war between Israel, Syria, Jordan and Egypt, and are home to about 20,000 Druze Arabs. Most of the territory is divided by a border fence, but it is possible to cross the border in more mountainous parts of the region, where it is hard to build a well-fortified barrier.
Israeli officials have been communicating about the case with Russian counterparts since at least Feb. 8. To facilitate the exchange, Mr. Netanyahu spoke twice with President Vladimir V. Putin of Russia.
But the possibility of a swap was kept secret until Tuesday, for fear of jeopardizing the deal.
The Israeli woman was first meant to be swapped for two Arab residents of the Israeli-occupied Golan Heights who were being held by Israeli authorities.
But one of them, Diyab Qahmuz, in prison for smuggling explosives from Lebanon into Israel, according to Israeli media, refused to be sent to Syria. The second, Nihal al-Maqt, is still subject to further questioning by the Israeli domestic intelligence agency, the official said.
The Syrian shepherds were then quickly lined up as replacements, leading to their release at a Syrian border crossing on Thursday afternoon, and the woman’s subsequent delivery to Moscow. It was unclear early Friday whether she had yet left the Russian capital to return to Israel.
“The State of Israel wishes to express appreciation for the actions of the President of Russia,” the Israeli prime minister’s office said in a statement.
Russia has mediated in similar episodes in the past. In 2016, Mr. Putin helped facilitate the return of an Israeli tank captured by Syrian troops in southern Lebanon in 1982. Three years later, the Kremlin mediated the return of the remains of a tank driver killed in the same battle, Zachary Baumel.
Isabel Kershner contributed reporting.