Hamas released an Israeli soldier today in exchange for hundreds of Palestinian prisoners.
The deal ends a five-and-a-half-year campaign to free him that has seen many Israeli military offensives in Gaza, an Israeli blockade on the territory, and numerous rounds of failed negotiations.
The swap got under way early today as militant group Hamas took Sergeant Gilad Schalit across Gaza's border with Egypt, which brokered the deal.
Israel simultaneously began freeing the Palestinian prisoners.
Sgt Schalit will be flown by helicopter to an air force base in central Israel, where he will meet his parents, as well as Israeli prime minister Benjamin Netanyahu, the defence minister and military chief of staff.
Sgt Schalit's father Noam made a brief television appearance on his way to the base.
Asked whether this was the happiest day of his life, he said: "Yes, you can make that assumption."
Mr Schalit has led a massive campaign to press the Israeli government to bring the 25-year-old home.
Before dawn, convoys of white vans and trucks transported hundreds of Palestinian prisoners to the locations in the West Bank and on the Israel-Egypt border where they were to be freed.
In Gaza, Hamas militants deployed in force along the road leading into Egypt where Sgt Schalit was taken. Hundreds of returning Palestinians were expected to enter Gaza on the same road.
Preparations for a mass rally to greet the prisoners took place in a large field in Gaza City.
Hamas organisers set up thousands of plastic chairs and erected a stage that can hold hundreds of people. The stage was decorated with a mural depicting the capture of Sgt Schalit.
Armed Hamas security guards were deployed on rooftops overlooking the field.
In the West Bank, on the opposite side of Israel, about 200 relatives of prisoners waited at a checkpoint.
Mariam Shkair, waiting for her brother Abdel Latif, 52, who spent 25 years in prison for killing an Israeli soldier, said: "We're so excited we can barely breathe. We are waiting to hug him."
Some of the relatives raised Palestinian flags or the green banners of Hamas. A group of young men chanted: "We will continue our struggle."
The exchange, negotiated through Egyptian mediators because Israel and Hamas refuse to talk directly to each other, is going ahead despite criticism and court appeals in Israel. Nearly 300 of the prisoners were serving lengthy sentences for involvement in fatal attacks.
The exchange involves a series of staged releases, each one triggering the next. The Red Cross and Egyptian officials are involved in the movement of prisoners.
When today's exchange is complete, 477 Palestinians held in Israeli jails, including 27 women, will have been released, several of them after decades.
More than 200 prisoners, originally from the West Bank, will instead be sent to the fenced-off Gaza Strip. And some 40 prisoners will be deported to Syria, Qatar, Turkey and Jordan. Another 550 prisoners are expected to be released in two months.
Two of the women were reportedly refusing to be sent to Gaza and instead asking to be sent to Egypt.
Little is known about Sgt Schalit's condition, although he appeared healthy in a brief and scripted 2009 video released by Hamas.
He was denied all visits, including by the Red Cross, and the state of his mental and physical health is unclear.
An intense media campaign to free Sgt Schalit has made him a national symbol in Israel.
Israel and Hamas have held numerous rounds of talks through German and Egyptian mediators, but officials on both sides have said that conditions prompted in part by the recent Egyptian revolution helped them reach an agreement.
Both sides have been keen to have good relations with the new Egyptian leadership, which brokered the deal.