RAMALLAH, West Bank — Two Israeli soldiers led astray by their smartphone navigation app accidentally wandered into an unruly area of the West Bank, provoking clashes and a gun battle that left a Palestinian man dead.

The soldiers, from the army’s canine unit, were following Waze, a navigation app, late Monday when they drove into an area bordering the Kalandia refugee camp, between Jerusalem and Ramallah.

The app is popular among Israelis, but soldiers are under standing orders not to use GPS services in areas they are not familiar with, said Lt. Col. Peter Lerner, a spokesman for the Israeli military.

“They should be using maps, and they should know the route,” he said.

Armed, in uniform and driving a clearly identifiable military vehicle, they were quickly attacked by Palestinians, who apparently suspected that the soldiers were part of a military raid.