Israel has released 26 Palestinian prisoners as part of a deal that will see peace talks resume on Wednesday.
Buses carrying the inmates drove them from a prison in central Israel to the Beitunia checkpoint in the West Bank and the Erez crossing with Gaza.
Palestinian President Mahmoud Abbas greeted the 11 sent to the West Bank, while crowds met the other 15 in Gaza.
Israeli and Palestinian representatives will begin direct talks in Jerusalem after a three-year hiatus.
'Just the first'
The BBC's Yolande Knell says there was a festive atmosphere in the West Bank village of Beitunia when the freed prisoners passed through the nearby checkpoint on Tuesday evening.
The men were then driven to the Muqataa presidential compound in Ramallah, where they were kissed and embraced by President Abbas.
Celebrations have begun in the West Bank and in the
Gaza Strip to welcome home the prisoners. Most have
been in jail for some 20 years.
On the Palestinian side, the men are viewed as heroes
of the nationalist cause.
But many were convicted of murder and most Israelis
view them as terrorists.
The Israeli prison service arranged this handover late
at night to make it less of a spectacle.
They then prayed at the tomb of the late Palestinian leader, Yasser Arafat, before joining the president on a podium to cheers from hundreds of people waiting to see them.
In a speech, Mr Abbas said he would not rest "until we free all the prisoners from Israeli jails".
"We congratulate ourselves and our families for our brothers who left the darkness of the prisons for the light of the sun of freedom. We say to them and to you that the remainder are on their way, these are just the first," he added.
Israel has agreed to free a further 78 long-serving prisoners as part of a deal to revive the peace process. The releases will take place in four tranches over a period of nine months, depending on progress in the talks.
Later, the former prisoners were mobbed by relatives, friends and well-wishers. Several of them were hoisted onto shoulders and paraded through the crowd.
In the northern Gaza Strip, hundreds of people gathered at the Palestinian side of the Erez crossing to greet the prisoners. Fireworks lit the night sky, as supporters of the rival Hamas and Fatah factions, including several masked gunmen, made victory signs and waved flags.
Earlier in the evening, two buses carrying the 26 Palestinians, many of whom were convicted of grisly killings, left Ayalon prison near Tel Aviv. Relatives of their victims, many with their hands painted red, jeered and briefly tried to block the road.
Israeli President Shimon Peres: "One state for the two nations means to internalise the conflict between us"
One bus headed off to the Erez crossing, while the other went to Ofer prison, near Ramallah, where they were handed over to Palestinian officials before being taken to Ramallah.
The released prisoners were named by the Israeli Prison Service shortly after midnight on Sunday, giving Israelis 48 hours to submit legal challenges to the Supreme Court. The court rejected an appeal by a victims' rights group that objected to all the releases on Tuesday.
The prisoners are seen as heroes of the Palestinian cause, but on the Israeli side they are simply seen as terrorists, our correspondent says.
"I want to see this 'hero' coming back home, saying that he killed a 34-year-old pregnant woman and a five-year old kid," said Avi Moses, who lost his wife and son in a bomb attack in 1987. "They should be ashamed of themselves. They are cowards."
Settlement move 'expected'
Despite the positive Palestinian reaction to the prisoner releases, many fear Wednesday's talks will be overshadowed by the Israeli housing ministry's decision on Sunday to issue tenders for the building of 793 housing units in East Jerusalem and 394 elsewhere in the West Bank.
Palestinian representatives accused Israel of trying to sabotage the negotiations.
Palestinian President Mahmoud Abbas greeted the
released prisoners, as Yolande Knell reports
About 500,000 Jews live in more than 100 settlements built since Israel's 1967 occupation of the West Bank and East Jerusalem. The settlements are considered illegal under international law, though Israel disputes this.
On Monday, US Secretary of State John Kerry urged the Palestinians "not to react adversely".
He said the announcement was "to some degree expected", but that he did not expect it would derail the negotiations.
Mr Kerry stated that the US "views all of the settlements as illegitimate" and had "communicated that policy very clearly to Israel".
"I think that what this underscores, actually, is the importance of getting to the table and getting to the table quickly," he added.
On Tuesday, it emerged that the municipality of Jerusalem had approved a further 900 homes close to the Jewish settlement of Gilo in East Jerusalem. A city councillor said construction would not begin for years.
Our correspondent says that when Israeli and Palestinian negotiators return to the negotiating table on Wednesday it will be in a charged atmosphere of renewed mistrust.