JERUSALEM — Appearing side by side before meeting here Tuesday evening, the Israeli and Palestinian prime ministers declared their mutual respect and hopes for peace, while Israeli forces prepared to withdraw today from the West Bank town of Bethlehem.

Prime Minister Ariel Sharon of Israel said that he envisioned a joint "future of hope and prospects, which seems to be — perhaps now more than ever — within reach." His Palestinian counterpart, Mahmoud Abbas, said that it was time to "put the past behind us" and declared: "Each life that is lost is a human tragedy. No more suffering, no more death, no more pain."

Then, with their top advisers, the prime ministers sat down for more than two hours in what a senior Israeli official called "one of the most important confidence-building meetings between the Israelis and Palestinians."

It was the fourth meeting between the two — including one with President Bush at a summit meeting last month in Aqaba, Jordan — but it was the first time that they chose to appear publicly together, on their own. The intense pressure from Americans, Europeans and others that has brought them to this point was invisible on Tuesday, in contrast to the Aqaba meeting.

The imagery, broadcast live on Israeli and Palestinian television, was of two leaders in business suits, each patiently waiting for his remarks to be translated into the other's language and intently listening to his counterpart.

Speaking outside his office here in the mellowing light of late afternoon, Sharon directed some of his comments to Palestinians, just as Abbas directed some of his to Israelis. Each said his goal was a life in peace, side by side.

"Our struggle is a political struggle, which we will end through diplomatic means," Abbas said. "We have no hostility toward the Israeli people and we have no interest in continuing the struggle with you."

Then, with no mediators to draw them together, the two men stepped toward each other and, smiling, shook hands with apparent warmth.

Before the leaders met, violence flared again on Tuesday, as what the Israeli army described as a lone Palestinian gunman attacked an Israeli roadblock near the West Bank city of Tulkarm.

Soldiers returned fire and killed the man, the army said.

On Sunday night and Monday, Israeli forces released their hold on most Palestinian-controlled areas of the Gaza Strip. On Tuesday, workers in the northern Gaza town of Beit Hanun labored in clouds of dust to repair sewer lines crushed by Israeli armor, as heavy machinery cleared away the debris-choking streets.

In Bethlehem, just south of Jerusalem, Israeli trucks carted away some equipment in preparation for the broader withdrawal. Israeli troops will continue to ring Bethlehem, maintaining checkpoints at its exits. Israel has also over the past year dug ditches and strung barbed wire partly around Bethlehem in what it calls a bulwark against terrorist attacks.

It was a striking moment for Israelis and Palestinians who suffered through the violence of the last 33 months — the suicide bombings on Israeli buses and the smashing of Palestinian homes — and witnessed the chasm it opened between the two sides. As they stood close together, Abbas drew back his head and appeared to chuckle at a joke by Sharon, described for years by Palestinians as "the butcher."

Although out of sight on Tuesday, American pressure was present nonetheless, according to some officials on its receiving end. They said that Bush administration officials had urged them to sound more positive about their encounters.

During the meeting, Abbas again asked Israel to permit Yasser Arafat, the pre-eminent Palestinian leader, to travel freely. Sharon replied that Israel would permit Arafat only to travel one-way from the West Bank city of Ramallah, where he has been trapped for a year, to Gaza City, in the Gaza Strip, officials on both sides said. Sharon made the same proposal in April 2002 in an interview with The New York Times.

But Sharon indicated new flexibility on another matter, the release of some 5,000 Palestinian prisoners now in Israeli jails. When pressed about this matter, a top priority for Palestinians but not an aspect of a new American-backed peace plan, Sharon replied that he had asked Israel's internal security agency to determine which prisoners could be safely freed. Israel intends to hold onto those with "blood on their hands," Israeli officials said.

A Palestinian official said that Muhammed Dahlan, the Palestinian minister of security, warned that the issue of prisoners was "undermining the Palestinian Authority and whittling away Palestinian support."

To gauge progress under the peace plan, known as the road map, the two prime ministers agreed to establish joint committees, with American participation, to monitor four areas: security, economic growth, incitement to violence and legal and political differences, Israeli officials said.

Raanan Gissin, Sharon's spokesman, called the meeting "very positive" and "businesslike," free of the recriminations of past sessions.

"I think there is a basic understanding on both sides: 'Let's make less declarations and more troop withdrawals and troop deployments,"' he said, referring to Israel's gradual return of policing responsibility to Palestinian officers for what by previous agreement are Palestinian-controlled areas of the West Bank and Gaza.

There was no immediate claim of responsibility, but the Al Aksa Martyrs Brigades, an offshoot of Abbas' Fatah movement, is highly active in the area. It was that group that took responsibility for the sniper killing Monday of a foreign worker driving an Israeli truck through the West Bank.

The three leading Palestinian factions — Fatah, Hamas and Islamic Jihad — announced on Sunday that they were suspending attacks against Israelis.

The pleasant words on Tuesday evening disguised deep disagreements between the two sides over the peace plan, including the future of Israeli settlements in the West Bank and Gaza. Yet progress on the plan continued on Tuesday.