Two Jordanians arrested in Israel in May were repatriated on Tuesday, after Israel dropped charges against them.
Jordan's foreign ministry said early on Tuesday that "the Israeli authorities have decided to withdraw the charges against Jordanian citizens Mussab Daajah and Khalifa Onouz and end their arrest".
A few hours later the ministry said that it had received the two Jordanian citizens "after they were released by Israel today".
A statement from Israel's internal security agency said the two, carrying knives and ropes, were caught in northern Israel on May 16.
Israeli security troops arrested them when they crossed into Israel illegally on foot overnight, the two governments said.
"From their investigation it emerged that they planned on reaching Jerusalem and carrying out a stabbing attack against soldiers in the area of Al Aqsa mosque compound," the Shin Bet said.
“The suspects were armed with knives and are being questioned by security intelligence services,” Israel’s security forces said at the time.
They were arrested on a main road near Maaleh Giboah in northern Israel.
Israel's decision not to prosecute the Jordanian suspects and to release them instead was "part of the security and diplomatic reciprocity between Israel and Jordan", the Shin Bet said.
The Jordanian Foreign Ministry said its embassy in Tel Aviv was “in contact with the Israeli authorities” at the time about the release of the two Jordanian citizens.
After the arrests Jordan's foreign ministry summoned the Israeli ambassador in protest at Israel's detention of the two men and the Jordanian parliament unanimously presented a memo to the government demanding the expulsion of the Israeli ambassador in Amman.
The ministry said it wanted to "convey a strongly worded protest message pertaining to the detention of two Jordanians in Israel", and to demand their release.
Official media had quoted Prime Minister Bisher Al Khasawneh as saying that the government would study the request “in accordance with our national interest".