Israel celebrated peace tonight with music, dancing and prayers of thanksgiving that were dampened neither by raw winter winds nor by the uncertainty of what the historic treaty with Egypt will bring in the future.

Thousands of Israelis in Jerusalem, Tel Aviv and towns and cities across the country took to the streets to dance to lively folk nusic, parade with flaming torches and sing the spirited nationalistic songs that accompanied the founding of the Jewish state 30 years ago.

At the Wailing Wall of the temple, residents of Jerusalem, children from nearby kibbutzim and tourists joined hands and sang late into the night with unashamed patriotism and unrestrained joy over the end of a state of war that has existed as long as Israel has.

In the only reported incident of violence in Jerusalem, five tourists, four of them Americans, were injured, none seriously, when a grenade thrown by unidentified persons exploded just 10 minutes before the signing of the treaty.

In Tel Aviv, thousands filled a public square in a carnival-like atmosphere, some dancing and singing, others watching somberly while the televised peace treaty signing was shown on huge outdoor screens.

In both places, young Israelis dominated the crowds, which seemed fitting, since it is they who would have to fight -- and die -- in another war.

Those who have fallen in five wars were also remembered. Women soldiers and students visited the scores of military cemeteries throughout Israel, placing red carnations on each of 20,000 graves of the war dead.

At the Wailing Wall, Jerusalem Mayor Teddy Kollek said, "There is no place that symbolizes peace more than this wall, and from here we send greetings of peace to Prime Minister Menachem Begin, President Anwar Sadat and President Jimmy Carter... from the city of peace to these people of peace."

Israeli President Yitzhak Navon, in a television address in Arabic to "the members of the Arab people wherever they might be," appealed to all nations of the Middle East to join the peace process.

"The time has come for the great and historic sulha -- the reconciliation -- between the Semitic peoples. The time has come for the peaceful meeting between the Arab national movement of the Jewish people" Kollek said.

Navon also appealed to Arab residents of the Israeli-occupied West Bank and Gaza Strip "to open their hearts and look forward with hope and optimism to the new move. The peace treaty with Egypt has not neglected you."

Throughout the day, however, Arabs in the occupied territories showed no sign of considering themselves a part of the peace accords.

Most Arabs stayed away from work and remained in their homes in a silent protest of the treaty, which they say does not take into account their Palestinian national aspirations.

Virtually all shops and businesses in the West Bank, Gaza Strip and East Jerusalem remained shuttered throughout the day, and schools in the territories remained shut as authorities extended the spring vaction until the end of the week.

In midafternoon, Ramallah, the most populous West Bank town, was all but deserted, as Israeli Army patrols stood watch at key intersections and patrolled the streets.

A half-burned truck tire, a remnant of a short-lived demonstration, lay in the street as a squad of soldiers, wearing riot gear and carrying truncheons, walked single-file along Nablus road.

At the entrance to a Palestinian refugee camp, soldiers checked traffic while children played nearby and Arab women stood in doorways silently viewing the quietness of the normally bustling highway.

A potentially explosive confrontation between Jewish ultranationalists and West Bank Arabs was defused when leaders of the Gush Emunim acceded to a request by Acting Prime Minister Zevulun Hammer and postponed plans to lay cornerstones for nine illegal settlements in the occupied territories. The ceremony had been timed to coincide with the treaty signing.

For several weeks, Jewish settlers and West Bank Arabs have clashed repeatedly, the most serious incidents occuring near Ramallah when armed vigilantes from the Ofra settlement chased Palestinian youths and fired automatic weapons into the air after their bus was stoned during a demonstration.

The Cabinet yesterday discussed the security situation in the occupied areas and decided the government will deal with Arab demonstrations this week with a firm hand.

Soldiers were present in almost every West Bank town, and patrols were stepped up in the Old City in Jerusalem.