JERUSALEM — Jordan has recalled its ambassador to Israel for consultations and detained an Israeli citizen who it says crossed the border illegally amid a sharpening dispute over Israel’s weekslong detention of two Jordanian citizens on suspicion of vague security violations.

The spike in tensions comes days after the 25th anniversary of the signing of the 1994 Israeli-Jordanian peace treaty, which neither side commemorated officially, an indication of the testy state of diplomatic relations between Israel and its Arab neighbor to the east.

Jordan’s foreign minister, Ayman Safadi, announced on Twitter late Tuesday that the ambassador, who left for Jordan on Wednesday, was being recalled for consultations “as a first step” after the Israeli government had refused to heed what he called Jordan’s legitimate demands for releasing its two citizens, Hiba Labadi and Abdul Rahman Miri.

Ms. Labadi was detained on Aug. 20 and Mr. Miri on Sept. 12 at the border crossing between Jordan and the Israeli-occupied West Bank, according to a lawyer representing them, and are being held in administrative detention without charges.