Israel's High Court has ordered the government to respond within 30 days to a World Court ruling that the West Bank barrier is illegal.
The Israeli High Court has already ordered changes in the barrier route
In a related development, the Haaretz newspaper reports that Attorney General Menachem Mazuz has advised the government to reroute the barrier.
He argued that this will help Israel to avoid international sanctions, it says.
Mr Mazuz is reported to have suggested that Israel modify the route in line with the World Court's ruling.
The attorney general also recommends that the barrier route is brought in accordance with principles previously set out by Israeli High Court rulings.
Last month the International Court of Justice (ICJ) issued a non-binding ruling that the parts of the barrier built on Palestinian land were illegal.
Israel argues that the barrier is needed to stop attacks by Palestinian militants.
The Palestinian Authority says the real goal of the barrier is to grab more Palestinian land. The wall is built inside the West Bank and in parts cuts a long way into the territory.
The Israeli government has previously said it will ignore July's non-binding verdict by the ICJ, the UN's highest legal body, that parts of the barrier built on Palestinian land should be pulled down.
But the country's top judges have now called on the government to compile a written assessment of the ramifications of the ICJ ruling.
Chief Justice Aharon Barak is reported to have said that a petition filed by residents against one section of the barrier offers an opportunity for the Israeli government to respond to the ICJ ruling.
The senior Israeli judges made the order during a hearing of seven petitions challenging the building of the barrier in Palestinian areas near Jerusalem.
Attorney General Mazuz has also warned the government not to ignore the ruling, as it could form the basis of international sanctions against Israel.
"It is hard to overestimate the negative repercussions of the decision of the International Court of Justice at The Hague for the state of Israel in various realms, including issues that go beyond the separation fence," Mr Mazuz has said in a report commissioned by Prime Minister Ariel Sharon.
"The decision creates a legal reality for Israel in the international arena, which could serve as an excuse and a catalyst for activity against Israel in international forums, to the point of sanctions."
Apart from the ICJ ruling, a UN report has concluded that the 700km (440-mile) barrier is and will cause serious human suffering to 700,000 Palestinians, cutting them off from their farms, jobs and schools.
Israel's Supreme Court ruled in June this year that one section of the barrier must be rerouted to minimise its impact on civilian populations.
Israeli defence ministry officials have been reworking the route of the fence in line with the recommendations.