Colonel Ilan Paz stands on a rooftop looking down onto the streets of Ramallah.

If any Palestinian fancied taking a pot shot at the commander of the largest Israeli army brigade in the West Bank, now would be the moment to do it. But Col Paz, a wiry man with close-cropped greying hair, is unconcerned and so, apparently, are the Palestinians.

This is Psagot - what Israelis call a village and the rest of the world calls an illegal settlement. The distance between Psagot and the nearest house in Palestinian-controlled Ramallah is just 10 metres.

Although about 1,000 settlers live here, any visitor can see that its purpose is strategic: Psagot means "summit" in Hebrew, and it dominates Ramallah. From here, a few weeks ago, two missiles fired into a street below narrowly missed assassinating Marwan Barghouti, the West Bank's Fatah chief.

Col Paz says the army's role is purely defensive and points out the Palestinians' favourite sniper positions - a couple of half-finished buildings (one blackened by Israeli shells) in Ramallah and a cemetery.

The short and obvious way up to Psagot is from Ramallah - but nowadays nobody comes that way. There is a new road, winding round the back of the hill, out of the line of fire.

The suburban-style settler homes facing Ramallah once had a pretty view, but not anymore. A 10ft concrete wall is going up, to keep bullets out of their living rooms.

In the municipality building there is a windowless control centre, equipped with TV screens, computers and dozens of telephones. This is where they coordinate emergency services if any settler in the region presses the panic button.

There is even a global positioning system, linked to satellites, which can track settlers' cars. It recently spotted a car, which the distraught owner had reported stolen ... being transported to the police compound for a parking offence.

Psagot was established in 1981 as part of Israel's plan to consolidate its position in the occupied territories, using settlements to create "facts on the ground". Having built the settlements, the Israelis needed to protect them - which provided a handy justification for their continuing military presence in the West Bank and Gaza.

It is scarcely surprising that "facts on the ground" have now turned into problems on the ground. Apart from making a political solution more difficult, the effect of settlements has been to multiply the potential for conflict.

Col Paz is military commander for the region, which is known to Israelis as Binyamin. His orders are to protect the 60,000 settlers who live alongside the original population of 300,000. The area, surrounding Ramallah, covers 1,100 sq km and has 60 settlements, plus 470km of roads.

Since the intifada began, 20 settlers have been killed on Colonel Paz's patch - mostly in attacks on the quiet country roads.

Outpost 840 - named after its height above sea level - is a small hilltop encampment set up seven months ago after two settlers were killed nearby on the Jerusalem-Nablus road. The outpost is a makeshift place, its perimeter marked by tumbled stone walls.

On the hill opposite, there is a good view of Ain Yabroud, a Palestinian village, and Ofra, a Jewish settlement less than 2km beyond it. But people in Ain Yabroud have an equally good view of Outpost 840 and the soldiers, who have little protection inside their tents, occasionally come under fire - usually at night.

"If we can identify the source of fire we shoot back. If not, we don't," a soldier says.

From the outpost, they patrol the road in an armoured car. But the road passes through numerous cuttings, which make ideal vantage points for snipers or fire-bombers, so the army has made new tracks, parallel to the road but running along the tops of cuttings.

At the Ayosh junction the Israeli military area of Bet El meets the northern tip of Ramallah and the road is blocked by lumps of concrete. Col Paz points out a couple of empty buildings which he says are used by snipers, and, nearby, the luxurious villa owned by Jibril Rajoub, the Palestinian security chief.

The junction is familiar to television viewers around the world for its violent clashes, but today it is absolutely deserted. In the distance, a few Palestinian cars head towards us but all turn off to the left.

It is like this almost all of the time, Col Paz says: trouble comes only on Fridays, after midday prayers, and then only if TV cameras are present. "They wait for the press," he says. "If the press is not there we don't have anything."

Col Paz says he would like to remove the concrete blocks and reopen the road, but the Palestinians object - not surprisingly, since this is the most likely route for Israeli tanks to enter Ramallah.

A short distance from the junction, the district coordination office serves as a contact point for officials from the warring sides. It is little more than a compound, split across the middle by a wire fence, a gate and a dried-up bed of geraniums.

The Israeli half is shielded from Ramallah by a high wall of 9in concrete blocks. Through the wire fence we can see Palestinian officials going about their business, and they can see us. We are just a few feet apart, but nobody says hello.

A couple of huts, with doors at each end, straddle the dividing line and serve as meeting rooms. It used to be possible to enter at one end and walk straight through but now, a soldier says, dividing walls have been put up inside - such is the lack of trust.

The aim of the coordination office is to sort out misunderstandings and try to prevent acts of violence, Col Paz says. "We have some kind of cooperation with the Palestinians, but most of the time it doesn't work." These days, the facility is used mainly for exchanging dead bodies.

Besides protecting settlers, Col Paz is also required to stop potential bombers travelling into Israel from Palestinian cities. Following recent suicide attacks, the closure of Ramallah has been tightened but, with thousands of people crossing to Jerusalem every day, the army admits that the area can never be "hermetically sealed".

Until recently the checks were based on a typical "terrorist profile": male, unmarried, aged between 17 and 35. This is now extended to include older and married men. Women are also coming under suspicion.

That seems to leave few who are not suspects, but a senior officer insisted: "Our soldiers know the people they want to check".

According to the Israeli army's latest analysis, the intifada could last another five years. Five more years for Col Paz and his troops to patrol their 470km of roads, trying to protect settlers and trying to keep the suicide bombers a bay.

The colonel is not so foolish as to promise that he will succeed, but says he is determined to maintain the effort as long as is necessary. His words have a familiar ring - we have heard them before from army chiefs in Vietnam, in Northern Ireland and, of course, southern Lebanon.

History and instinct tell us that security measures on their own cannot solve the problem. Sooner or later, when the Israeli public realise that, there will be a political solution.

At present, the mood among Israelis favours ever-tougher security. The result, though, is not what they hoped. The proportion of Israeli casualties in the conflict, while still low, is increasing. Shortly after the intifada began, Israelis accounted for around 10% of those killed. Now, despite all the security measures, despite the violent punishments meted out to the Palestinians, the figure is over 20%.

Since the intifada began, one of the constant flashpoints has been between the Israeli settlement of Gilo and the neighbouring Palestinian village of Beit Jalla.

Two weeks ago, the Israeli prime minister, Ariel Sharon, announced that he was going to put a stop to attacks on Gilo once and for all. Last week, the tanks went into Beit Jalla but pulled out again after criticism from the Americans and European efforts to negotiate a local ceasefire.

Officially, the Israelis proclaimed the operation a success. The Palestinians hailed it as a victory, while Sharon's rightwing critics declared it a defeat. Nobody seriously expected the calm to last, and on Monday morning a car bomb exploded in Gilo, injuring two people.

That is unlikely to be the end of the matter, but what the episode clearly shows is that Sharon's security-by-force policies are not working. Once the consequences of that filter through into Israeli public opinion we may be able to look back on last week's adventure into Beit Jalla as a watershed in the conflict.