The two Palestinian mayors considered most moderate by many American observers say that time is running out in the Israeli-occupied territories. Mayor Elias Freij of Bethlehem and ousted Mayor Rashad Shawa of Gaza said in an interview that, increasingly, young Palestinians in the occupied territories are turning to Islamic fundamentalism - some call it reformism - as an outlet for their frustrations.
More and more of these youths, the two say, have become critical not only of the Israelis and their American supporters, but also of established Arab leaders. At the same time, they say, Israeli settlers have tightened their grip on the occupied West Bank so that Israeli control is reaching the point of no return.
''Many of our young people say to us: 'You want us to trust the Americans,' '' said Mayor Freij. '' 'But don't you see what Israel is doing? If it were not for American support of Israel, the Israelis would not have built the settlements.' ''
But according to Freij, there is nonetheless a ''consensus'' among the inhabitants of the largely rural West Bank in favor of reaching an accommodation with Israel. Two years ago, Freij began calling on the Palestine Liberation Organization (PLO) to recognize Israel so that negotiations could begin.
The aim of the negotiations, says Freij, would be the withdrawal of Israeli forces from the occupied territories, on the basis of United Nations Resolution 242, and the granting of ''self-determination'' to the 1.3 million Palestinians living on the Gaza Strip and the West Bank.
The idea of self-determination, or a Palestinian state, has been opposed by successive Israeli governments. It was ruled out in President Reagan's September 1982 peace plan. Reagan proposed instead Palestinian self-government in association with the Kingdom of Jordan.
Although Freij does not agree with every detail of the Reagan plan, he calls it ''a good basis for negotiation.''
Freij headed a delegation of West Bank Arab leaders which traveled to Jordan at the end of last month, despite Israeli warnings, to meet with PLO leader Yasser Arafat and Jordan's King Hussein.
Freij said that he urged Arafat and Hussein to launch a joint peace initiative as soon as possible to prevent the Israeli annexation of the territories which Israel captured during the 1967 war.
The PLO and Jordan have professed to see ''positive elements'' in the Reagan plan but have stopped short of endorsing it. Israel rejected the plan.
The Israeli Cabinet ruled several weeks ago that Freij and his West Bank colleagues had committed a crime by talking with Arafat. The Israelis have consistently refused to deal with the PLO.
Freij and Shawa argue, however, that Arafat retains considerable popularity in the occupied territories. Freij said that he would not move independently of the PLO.
The two mayors are a study in contrasts. The short, portly Freij is a businessman and a Christian living in a predominantly Muslim society. Shawa is a tall, British-educated
aristrocrat and landowner. The Israelis dismissed him from his post in July 1982, when he refused to recognize the authority of the Israeli civil administration in Gaza.
Of the 25 mayors elected in 1976 on the West Bank, about a dozen have been dismissed or expelled.
Freij and Shawa agree that unless there is a political breakthrough, the Palestinians will be faced with not a formal but a de facto Israeli annexation of the occupied territories. The two mayors said that nearly 60 percent of the West Bank and Gaza is now in Israeli hands.
''I told both Hussein and Arafat that time is running out,'' said Mayor Freij. ''Every day that passes, Israel is consolidating its presence.''
''The Arabs should challenge Israel for peace,'' said the Bethlehem mayor. ''We can learn to live together in peace. . . . But peace can only come through a withdrawal from the occupied territories. We want peace with freedom and peace with an identity and an address of our own.''
The two mayors met for more than an hour with US Secretary of State George Shultz on Monday, the fifth anniversary of the Camp David peace accords signed by Egypt and Israel. Shawa said that Shultz showed sympathy for their problems but seemed to indicate that little would be done to advance the ''peace process'' in this election year.
''You could see in his face that he's helpless to do anything,'' said Shawa.
''I hear your contestants for the primaries criticizing the US government for throwing money right and left,'' said Shawa. ''But no one has dared to ask the question, 'What about the billions that go to Israel every year?' ''
''How can a country that is as indebted as Israel is undertake a gigantic settlements program without American dollars?'' asked Shawa.
''Does no American have the guts to speak out in the American interest?''