MAZRAAT ECH SHARQIYA -- What was left of this Palestinian hilltop village's luck ran out this week when Israeli troops clashed with its men, wounding two and detaining 15 to 20 others, according to residents.

As is often the case, there are differing Palestinian and Israeli versions of the clash in the village Tuesday. No independent observer was present when the first hostile acts took place earlier in the month.

According to villagers, it all began Friday morning, Jan. 8, when an unidentified Jewish settler repeatedly fired a pistol out of his car window as he drove through this village of cypress and olive trees, sheep grazing and winter wheat just sprouting in narrow, stone-fenced fields.

The villagers insist the firing was unprovoked. Thinking back, a businessman named Sharif said that at the time "we thought that the settler might have been frightened" by the sight of a large group of villagers gathered to bury a man who died of cancer and had mistaken the funeral for a hostile demonstration.

Later that morning, villagers said, two settlers drove up in a Peugeot pickup from the south where a Jewish settlement called Ofra was established in 1975. Over the years, the villagers said, they maintained correct, if distant, business relations with settlers who sometimes came to buy the oranges, olives, furniture and cut stones for which the village is known.

As is often the case, the two settlers were armed, but the villagers said this time they were accompanied by an attack dog. Then, Sharif said as other villagers nodded, "The settlers entered the mosque during Friday prayers with the dog," a sacrilege in the Arab world, where dogs are considered unclean.

"People were very frightened and very angry," Sharif added, "because that was the ultimate insult. But what can you do when they had {sub-} machine guns and we had nothing, no arms."

Then and there the villagers decided to protect themselves and, in so doing, set in motion a series of ever more painful problems. They put up extensive stone roadblocks at the northern and southern entrances of the village, which lies across a heavily used shortcut linking northern communities in the occupied West Bank.

At Ofra, spokesman Israel Harel said Monday he had no recollection of any such provocation by settlers at Mazraat Ech Sharqiya. But he did recall that two settler vehicles had been stoned at the village at about that time.

The villagers readily acknowledged that after the mosque incident they waved the flag of the outlawed Palestine Liberation Organization, shouted nationalist slogans and cried, "Death to the Jews!"

The next day, a Saturday, a thousand villagers demonstrated against the occupation, burned tires and marched toward Israeli radar domes near the village's southern edge.

The Israelis responded by dropping tear gas from a helicopter and dispatching two truckloads of troops who started firing live ammunition at them, according to villagers. They showed visitors spent cartridges they said the Israelis had fired that Saturday.

An Army spokesman said there was no record of a clash at the village that day, but for the next 10 days the Army placed Mazraat Ech Sharqiya under curfew from 6 a.m. to 7 p.m. On Monday morning, the curfew was lifted, with the Army bulldozing away the roadblocks.

When interviewed on Monday, older villagers seemed as frightened of their own hot-headed youths, some of whom defiantly flaunted two PLO flags just around a hairpin turn in the middle of town, as they were of either the Army or the settlers.

Still, an Israeli Army Arab affairs specialist, identified as Capt. Said, had telephoned the village to reestablish a channel of communication.

The mukhtar, or village head man, told the captain he blamed the settlers for starting the trouble. When asked by the captain why he had not informed the Army, the mukhtar replied, "You don't pay any attention to the United Nations Security Council resolutions, so why would you listen to our complaints about the settlers?"

Despite such bravado, the villagers were clearly apprehensive. "The Israelis will never let us alone. No way," Sharif said Monday. "I expect them to come one of these days and question us one by one."

He was clearly hoping that the village would be given a few days to cool down. The Ofra settlement's spokesman also suggested that although in principle roads should be kept open at all times, perhaps the young villagers should be allowed to let off steam.

Taking no chances, Sharif said, on Tuesday morning he persuaded a friend to use his truck to remove a large metal garbage container that young villagers had used to block the road. "I was upset because I knew the Israelis could come at any moment," Sharif said.

In late morning the seven-man local council, summoned to Ramallah, 10 miles to the west, returned to the village to report that Capt. Said understood the villagers' anger at the settlers, but said that in the future they should talk to him.

The council members were jubilant. But less than an hour later, the Army came anyway.

The villagers said there were no roadblocks up when the troops suddenly arrived in a dozen vehicles, but they admit they then threw stones at the soldiers.

As many as 50 soldiers then clashed with four times as many Palestinians and a helicopter dropped tear gas canisters on the demonstrators, who put up new roadblocks and burned tires, visitors to the village reported.

A 17-year-old boy, Bassam Khakki, was shot in the shoulder and Azmi Assam, 25, was shot in the leg and hand, the villagers said.

The Army said it entered the town when stones were thrown at cars at a road near Ofra.

The Army said the troops used tear gas and rubber bullets at first, and only opened fire when they became endangered.

For the villagers, the clash was almost less important than their sense of betrayal. "While we were talking to the Israelis in Ramallah in good faith," one man said, "they were already sending their troops."