In the silence of the courtroom, there was an audible gasp of surprise and shock when Supreme Justice Aharon Barak, reading the court’s decision, reached the words: “The military commander did not use his discretion in a proportional way, as required.”

At that moment the veteran peace activists who filled the room realized that they had won.

Four days before, we could not have dreamt of that. We were far from the sterile silence of the beautiful Supreme Court building: a distance of a few kilometers geographically, a distance of light-years mentally.

At that time we were running through clouds of tear gas, choking and coughing, in the center of A-Ram.

It began, surprisingly, in an atmosphere of friendliness. We came in a convoy of buses from all over the country in order to join the inhabitants demonstrating against the wall, on the eve of the Supreme Court decision.

We expected to be held up at the roadblock across the entrance to A-Ram. The demonstration was not secret, we had announced it in the media. We were ready to leave the buses quickly and continue around the roadblock on foot. We were surprised, therefore, when the border-policemen were all smiles. The one who entered our bus spoke like a sympathizer. “Do you know what you are getting into?” he asked in a friendly way. When we answered that we did, he said “have a nice day” and waved us on.

In the center of A-Ram, thousands of Palestinians were waiting for us. We intended to march on the main road, along the planned path of the wall that will cut the densely populated urban area in two. The big concrete slabs of the wall were already lying in the ground, waiting for the moment when the court would lift the temporary injunction that is holding up the building activity.

The demonstration was intended, of course, to be completely non-violent. The proof: in the first line there marched a Christian Orthodox priest, a senior Muslim sheikh, local dignitaries and present and past members of the Knesset and the Palestinian parliament. In front of us walked the A-Ram youth orchestra.

As a symbolic act we had brought five big hammers, and some of the demonstrators were asked to use them to strike concrete slabs lying on the ground.

We advanced slowly in the burning sun. Suddenly a row of border-policemen appeared on top of the hill overlooking the road. Before we realized what was happening, a salvo of teargas grenades – one, two, three … dozens – were shot at us. In a few moments we were enveloped by a dense cloud of gas that covered all escape routes.

We dispersed in all directions, but the gas grenades continued to explode around us. Those of us who made it to the central square of the town were attacked with tear gas, water cannon and rubber-coated bullets.

The place resembled a real battlefield – clouds of gas, the sound of exploding stun grenades and shooting, the screaming sirens of the Palestinian ambulances, burning boxes along the street, abandoned posters, shuttered shops. When the Palestinian paramedics started to run with their stretchers towards the ambulances, local boys emerged from the alleys to throw stones at the border-policemen (a mercenary force universally hated in the Palestinian territories). From time to time groups of border-policemen ran towards us, grabbing demonstrators of both sexes and dragging them towards the armored jeeps. One of the ambulances was burning. Undercover policemen in plain clothes, pistols in their hands - beat people and dragged them along the ground.

All this continued for more than two hours. All that time, a question was nagging me: Why was this happening? Clearly we had walked into a well-prepared trap. But what was the aim?

On the way back we listened to the news on the radio. A police spokesman announced that the border-police had been attacked by demonstrators who threw axes and hammers at them. In our bus, everybody burst out laughing.

The mystery was solved two days later in court, when the judges were dealing with A-Ram. The government attorneys demanded that the temporary injunction that was holding up the wall in A-Ram be lifted. They had a crushing argument: two days ago, they said, the border-policemen guarding the machinery had been viciously attacked by demonstrators. Their life was in danger. Therefore, in order to save the policemen from the evildoers (us), the building of the wall must be speeded up.

The judges, so it seems, were not impressed. They announced that in another two days, on Wednesday, the court would publish a set of principles that would, from now on, apply to he whole length of the barrier, including A-Ram.

And indeed, on Wednesday the decision that caused the audience to gasp was delivered. We knew in advance that the court could not forbid the wall altogether. That would have been a challenge to the government, the army and the national consensus. Neither did we expect a decision that would have decreed that the wall should be set up on the Green Line (the internationally recognized pre-1967 border).

We thought that the court would, at most, change the path of the wall a few kilometers here and there. But the actual decision went much further: it demands big changes all along the 750 kilometers of the barrier, in order to remove it from the vicinity of Palestinian villages and release their land.

The judges accepted, in fact, most of the arguments that we had been voicing in dozens of demonstrations: (a) that the path of the wall violates international law, (b) that it destroys the fabric of life of the Palestinian population and turns their life into hell, and (c) that this path does not emanate from security considerations, but rather from a desire to enlarge the settlements, annex territory to Israel and drive the Palestinians out.

Judge Barak, the president of the Supreme Court who drafted the decision, was walking a tightrope. On one side he risked provoking the powerful military establishment and a large section of public opinion. On the other side, he wanted to keep his considerable reputation in the international judicial community.

Years ago I interviewed him at length. One of the things he told me is engraved in my memory: “The court has no divisions to enforce its decisions. Its power is based solely on the confidence of the public. Therefore, the court cannot distance itself too much from the public.” That was shown again this week: Barak went very far, but knew where to stop – half way between the planned path and the green Line. In this he was helped by the Council for Peace and Security, a pro-peace group of retired senior army officers, who proposed an alternative path.

Barak knows well that he is taking a considerable risk: if a suicide attack now takes place inside Israel, the right-wing will surely put the blame on the court.

Actually, something similar has already happened. Only a few minutes after the court decision was read out, Colonel (res.) Danny Tirzeh, the skull-capped officer with responsibility at the Ministry of Defense for the building of the wall, said that the court’s decision will cause Jews to be murdered. The man was not fired on the spot, God forbid, but only rebuked by his minister.

Ariel Sharon may well be satisfied with the court’s decision. True, the path of the wall will have to be planned anew, costing more money and time. But in a week the International Court of Justice in The Hague will deliver its decision on the wall and the matter will return to the UN. There the Israeli and American representatives will argue that the Israeli court has already rectified the inequities that needed to be addressed.

In A-Ram and the other suburbs of Jerusalem, too, the path will have to be changed. I hope that it will be removed from the highway where we were demonstrating last Saturday. I have inhaled enough gas to last me a while.