Mounting tensions in the West Bank over the Egyptian-Israeli peace treaty erupted here today when Israel security forces opened fire on Arab demonstrators, killing two and wounding another.

Israeli Army troops immediately sealed off the town and imposed a curfew, but the mayor of Halhul, Hassan Milhem, tonight described the situation as "very tense" and said he feared another flareup, if not here then elsewhere in the West Bank.

The government announced that a commission of inquirty will investigate the shooting.

Since President Carter's trip to Egypt and Israel was announced last week, almost every town in the West Bank has been swept by demonstrations and strikes by Palestinians opposed to the Middle East peace treaty. The Beirut-based Palestine Liberation Organization had urged unrest to coincide with Carter's visit.

Israeli authorities said the two Arabs were killed today when "shots were fired by soldiers and the civilians." But witnesses denied that the demonstrators had weapons and said the troops opened fire when rocks were thrown at them.

The shootings followed by four days a similar incident in the village of Bir Zeit, near Ramallah in the West Bank, when four high school students who had been demonstrating were wounded by gunfire by security forces. Those students also had been throwing stones at the troops.

Halhul, a small farming town between Bethlehem and Hebron, has been the scene of frequent disturbances. Two months ago, authorities closed schools here and imposed a curfew following the stoning of passing cars on the Hebron road.

The victims in today's confrontation were a 21-year-old laborer, Masri Anani, and a 17-year-old girls tudent, Rabaya Shalda. Another student, 16, was wounded in the leg.

In a terse statement, the army said the soldiers and the civilians were "caught up in a violent distrubance," and that shots were fired by both sides. However, witnesses said the soldiers first shot above the demonstrators heads, and, when more rocks were thrown, they fired directly into the crowd.

The clash came after Milhem protested to Israeli officials that eight members of the Halhul City Council, including himself, were detained for eight hours overnight in the courtyard of the local military governor's head-quarters in Hebron.

Milhem said the council was summoned to the headquarters at 2 a.m. after a passing bus was stoned by youths.

"We explained many times that the council is against stoning vehicles. We were not responsible," Milhem said.

While the council was at the governor's headquarters, youths set up barricades and began stoning security forces. Milhem denied that any of the demonstrators fired shots, saying: "They threw stones, but these kids don't have guns. Even men in this town don't have guns, because it's a life sentence if you get caught."

For the past several days, demonstrators have set up roadblocks and buned tires throughout the West Bank.

Bir Zeit University, a center of Palestinian political activity, remained closed today because, a university official said, "everyone is scared to come here."

Fifteen American citizens associated with the university sent a letter to Carter protesting "a constant state of fear and insecurity" and Israeli "official terrorism."

At Bir Zeit High School, students raised the Palestinian flag, but security was intensified and no clashes were reported.

In Hebron, however, soldiers fired in the air to disperse youths who burned tires and made barricades, according to Mayor Fahd Kawasmeh. Similar demonstrations have occurred all week in East Jerusalem, Ramallah, Nablus, Jericho, Bethlehem, Beit Jala and Beit Sahur. Dozens of protesters have been arrested.

Meanwhile, members of the ultranationalist Gush Emunim settlement in Ofra refused to surrender their weapons to the Israeli Army after vigilantes in the settlement fired at demonstration Arabs on Tuesday.

In a two-hour shooting spree, the settlers chased local Arabs, shot over their heads and forced some to clear roadblocks after they were stoned. Witnesses said the settlers were armed with Uzi submachine guns and Soviet-designed Kalashnikov assault rifles.

Since the Camp David peace negotiations began, there have been sporadic antitreaty demonstrations throughout the West Bank, occasionally fueled by militant statements by town mayors, most of whom support the PLO.

But the tempo of th protests picked up sharply after Carter announced his trip. Israeli security officials say the demonstrators are being organized by "outsiders."

Although Gaza town Mayor Rashid Shawwa also opposes any treaty that does not include the PLO, the Gaza Strip has been relatively free of disturbances.