NAQOURA, Lebanon — Israel freed a notorious Lebanese attacker and four others Wednesday after Hezbollah handed over two black coffins with the bodies of Israel soldiers, a dramatic prisoner swap that closes a painful chapter from the 2006 war in Lebanon.

The five — including Samir Kantar, who had been serving multiple life terms in Israel for a grisly 1979 attack — were brought home in International Committee for the Red Cross vehicles and received a red-carpet welcome at this coastal border town.

In Israel, family and friends outside the homes of the two captured Israeli soldiers burst into tears when TV images showed Lebanon's Hezbollah guerrillas taking the coffins out of a black van.

Though officials had suspected Ehud Goldwasser and Eldad Regev were dead, the sight of the coffins was the first confirmation of their fate.

The swap — mediated by a U.N.-appointed German official who shuttled between the sides for 18 months — reopened another searing moment from Israel's past with the release of Samir Kantar and four other Lebanese prisoners.

Kantar was convicted in a 1979 nighttime attack that killed a 4-year-old girl, her father and a policeman. Although polls show Israelis solidly endorse the exchange, many see Kantar as the embodiment of evil.

In Lebanon, a hero's welcome was prepared for Kantar, a Lebanese Druse who acted on behalf of the Palestine Liberation Front, a small faction of the PLO. The swap is likely to provide a significant boost to Hezbollah, which is trying to rebuild a reputation tarnished when it turned its guns on fellow Lebanese in May.

Winning freedom for Kantar was one of the reasons Hezbollah leader Sheik Hassan Nasrallah cited at the time for going to war with Israel in 2006.

Wednesday's exchange was a wrenching end to the war for Israel, which launched the fighting in response to the servicemen's capture. The campaign to bring them home had become a national crusade.

Israeli forensic experts examined the remains for several hours, checking dental records among other things, before confirming the soldiers' identities. Israeli generals then went to the families' homes to deliver the news.

"The military bows its head and lowers its flags and warmly embraces the families, remembering its fighters who fell and were held by the enemy for two years," Brig. Gen. Avi Benayahu, the chief military spokesman, said at the Rosh Hanikra border crossing.

The two soldiers, who were promoted posthumously, are to be buried on Thursday, he said.

The soldiers' Hezbollah captors had withheld any information about them since they were taken, refusing to release pictures or allow the Red Cross to see them. It was not clear if Regev and Goldwasser were killed in the original raid or if they died in captivity. Evidence at the scene indicated both were seriously wounded.

Goldwasser's newlywed wife, Karnit, had traveled the globe over the past two years, meeting with world leaders in a tireless campaign to bring the soldiers home. She and her father, Omri Avni, were at his parents' house when the family was notified.

"After two difficult years, this was the most difficult moment," he said. "Karnit vowed to bring Udi home. Now that this mission has been accomplished, a storm of emotions has erupted. ... We are in a difficult state."

Regev's father, Zvi, said he fell apart the moment he saw Hezbollah take the coffins out of a van and place them on the ground.

"It was horrible to see it. I didn't want to, I asked them to turn off the TV," he said, choking back tears.

"We were always hoping that Udi and Eldad were alive and that they would come home and we would hug them," he added, using Ehud Goldwasser's nickname. "We had this hope all the time."

An aunt of Regev's sank to the ground when she saw the coffins appear on a small TV hooked up outside the soldier's father's house. Some 50 friends, neighbors and family who had gathered there sobbed, rocked back and forth in prayer, lit candles or tugged at their hair. "Nasrallah, you will pay," several of the mourners vowed.

Other people in the crowd criticized Israeli Prime Minister Ehud Olmert, saying the soldiers died for nothing.

The confirmation set the stage for Israel to release Kantar and four other Lebanese prisoners to Hezbollah.

In the dead of night on April 22, 1979, Kantar and three other gunmen made their way in a rubber dinghy from Lebanon to the sleepy Israeli coastal town of Nahariya, 5 miles south of the Lebanese border. There, in a hail of gunfire and exploding grenades, they killed a policeman who stumbled upon them, then burst into the apartment of Danny Haran, herding him and his 4-year-old daughter outside at gunpoint to the beach below, where they were killed.

An Israeli court found that Kantar shot Danny Haran in front of his child, then smashed her head with his rifle butt.

Haran's wife, Smadar, who had fled into a crawl space in the family apartment with her 2-year-old daughter, accidentally smothered the child with her hand while trying to stifle her cries.

Kantar denies killing the older child, saying she was killed in the crossfire as he battled Israeli police, and has never expressed remorse. He was 16 years old at the time.

Two members of his squad were killed in the raid, and the third, taken alive, was released in a 1985 prisoner swap.

Israel held on to Kantar for decades, hoping to use him as a bargaining chip to win new information about an Israeli airman whose plane crashed in Lebanon in 1986.

But despite dissatisfaction over Hezbollah's report on the airman, provided over the weekend, and under pressure from the captured soldiers' families to bring them home, Israel's Cabinet voted on Tuesday to release Kantar.

On Tuesday, Hezbollah's commander in south Lebanon, Sheik Nabil Kaouk, called the swap an "official admission of defeat" for Israel.

A giant red carpet was rolled out along a road next to the seashore on the Lebanese side of the border, next to dozens of yellow Hezbollah flags whipping in the breeze.

Hezbollah supporters set up a makeshift stage in the coastal town of Naqoura, where a brass band awaited the returning prisoners. On the platform stood a large photograph of a weeping Israeli woman. A nearby sign read, "Israel is shedding tears of pain."

"Lebanon is shedding tears of joy," read another.

An official ceremony was planned at Beirut Airport and was to be attended by Lebanon's president, prime minister and parliament speaker. Later, Nasrallah was to address what is expected to be a huge celebration at Hezbollah's stronghold south of Beirut.

Also Wednesday, a Red Cross tractor-trailer arrived in Lebanon carrying wooden coffins containing the bodies of Lebanese and Palestinian fighters. Part of the swap included Israel handing over the remains of some 199 fighters.

In the Gaza Strip, controlled by the violently anti-Israel Hamas group, people handed out sweets to celebrate Kantar's impending release.

Ismail Haniyeh, Gaza's Hamas prime minister, warned Israel that it also will have to "pay the price" for an Israeli soldier that Hamas has been holding since June 2006 and presumed alive.

"There is a captive Israeli soldier, and thousands of our sons are in prison," Haniyeh said. "Let them answer our demands."

U.N. chief Ban Ki-moon, speaking in Germany, said he hoped Wednesday's prisoner swap would be "the beginning of many to come in the future."

Associated Press writers Aron Heller in Rosh Hanikra, Israel, Sam Ghattas in Beirut and Ian Deitch in Kiryat Motzkin contributed to this report.