Israel's Supreme Court has ordered changes in the route of the controversial security barrier the government is building in and around the West Bank. The Court ruled Wednesday that parts of the barrier are causing too much harm to the local Palestinian population.

The Supreme Court ruling affects a 30 km stretch of the security barrier northwest of Jerusalem. The judges' decision means the military will have to dismantle some sections of the barrier already built and rework plans for other parts.

The court decreed that the route of the barrier be changed in order to minimize hardships for tens of thousands of Palestinians living in the area, who risk being cut off from their farms, schools and jobs.

Mohammed Dahleh is the lawyer who brought the case before to the Court on behalf of Palestinian petitioners. He called the ruling courageous and important.

"The Supreme Court accepted our arguments that if Israel wants to build a wall it can build a wall in a different way, in a way that does not infringe upon basic rights of Palestinians in an disproportionate manner," he said.

Israel began building the barrier two years ago and plans to stretch this combination of walls, fences, trenches and barbed wire for over 600 kilometers in and around the West Bank. The government says it's already been successful in keeping out Palestinian suicide bombers. Palestinians and human rights activists say, however, the barrier, which in some areas cuts deep into the West Bank, is nothing more than a land grab.

The Supreme Court decided that, while re-routing the barrier could reduce security for Israelis, the current route violated Palestinian rights under international and humanitarian law.

Right-wing Israeli lawmaker Uzi Landau said the court made a mistake.

Mr. Landau added that the Palestinians may indeed be suffering, but he said it's more important to save the lives of Israeli women and children. He said the barrier has to be completed and should not be delayed.

The head of military logistics, Brigadier General Eran Ofir told Israel Radio that work on the barrier would continue in those areas authorized by the Court.

But, the general said the military will study the court ruling carefully and comply accordingly.

Palestinian Prime Minister Ahmed Qureia dismissed the Supreme Court ruling, saying the whole barrier is illegal and not just the part around Jerusalem that the Court focused on.

Mr. Qureia likened the security barrier to the Berlin Wall, which once separated East and West Germany. He said it should be completely dismantled.

The Court's ruling is widely regarded as an important precedent that could affect other areas of the barrier as well.

In just over a week, the International Court of Justice in The Hague is expected to issue an advisory ruling on the legality of the barrier. The ruling, which is non-binding, was requested by the United Nations at the behest of the Palestinians.