(CNN) --Israel and the Lebanese militant group Hezbollah conducted a historic prisoner swap Thursday after years of tense, secret negotiations brokered by Germany.

Two planes left Cologne, Germany, after the exchange -- one touching down in Beirut, Lebanon, to an enthusiastic greeting and the other landing in Tel Aviv, Israel, amid great national sorrow and anger.

Israel Defense Forces said more than two dozen Lebanese and Arab prisoners -- including two senior Hezbollah officials, Mustafa Dirani and Sheikh Abdel Karim Obeid -- flew to Beirut after the exchange occurred at an air base in Cologne. Stephan Smyrek, a German who worked with Hezbollah, also was freed.

Hezbollah, which Israel and the United States regards as a terrorist organization, released Elhanan Tannenbaum -- an Israeli businessman and army reserve colonel -- and the bodies of three IDF soldiers.

The swap was completed after Israel identified the soldiers' remains, which then were flown from Lebanon to the German air base.

The exchange was carried out on the same day as a terror attack in Jerusalem -- a suicide bomber set off a bomb on a bus, killing at least 10 people. (Full story)

In Lebanon, the freed prisoners were met with great fanfare when they emerged from their aircraft at the Beirut International Airport. They acknowledged waves and cheers as they descended the steps to meet their relatives in emotional reunions after long separations.

Lebanese President Emile Lahoud, Hezbollah guerrilla leader Sheikh Hassan Nasrallah and others embraced the former prisoners in a red carpet welcome as a band played patriotic music in the background.

"I'm a reborn man," Obeid said.

Somber emotions in Israel

In Tel Aviv, the mood reflected anguish, in part because some Israelis said they considered the exchange lopsided.

A state military ceremony was held at the airport after the bodies arrived.

Israel identified the soldiers as Sgt. Adi Avitan, Staff Sgt. Benyamin Avraham and Staff Sgt. Omar Sawaid. They had been missing since October 2000 and presumed dead.

Scores of people -- including Prime Minister Ariel Sharon, other dignitaries and distraught family members of the slain -- watched soldiers carry three Israeli flag-draped coffins and listened to speeches and music. People stood as the kaddish, the Jewish prayer for the dead, was recited. A Muslim prayer also was said. (Sawaid was a Bedouin Arab who was a Muslim.)

In an apparent reference to controversy over the deal, Sharon said the right move was made to bring the soldiers back to the "soil of their motherland" and their bereaved families.

"Together they fell in the fire of the enemy, and together they returned to the homeland they were called upon to defend," Sharon said. "May Benny, Adi and Omar be a blessed memory."

After speaking, the prime minister bowed in front of each coffin and took his seat.

The three soldiers are to be buried Friday.

Also as part of the exchange, Israel is releasing 400 Palestinian prisoners to the West Bank and Gaza, Germany said.

Dozens of Palestinian prisoners disembarked buses at the Tarkumiyah checkpoint to enter the West Bank. Many of them kissed the ground as they got off the bus.

In Beirut, the Israeli businessman moved across the tarmac toward the aircraft headed for Germany, saying "My name is Elhanan Tannenbaum, and I am an Israeli citizen."

Tannenbaum declined to discuss his abduction in 2000 but spoke about how he was treated in captivity.

"Very good. Very good. Thank you. I was treated very well by the Hezbollah," he said.

The German-brokered deal also calls for Israel to provide Lebanon with information on 24 missing Lebanese and to turn over the bodies of 59 Lebanese killed by Israeli forces, according to the Berlin government.

The agreement is based on a November Israeli Cabinet agreement in principle, which was delayed because of disagreements over Lebanese prisoner Samir Kuntar. Kuntar carried out an attack in Israel in 1979.

Hezbollah wanted Kuntar to be part of the deal, but Israel refused to release prisoners with "blood on their hands."

However, Kuntar's case now may be reviewed. The Israelis said the prisoner would be released after they receive "substantial proof" about what has happened to flyer Ron Arad.

Israel said that "with this arrangement, a mechanism has been put in place whose aim is to bring substantial information on the fate of captured navigator Ron Arad and his return home."

Israel has been holding Hezbolloh officials Obeid and Dirani -- whom Israeli commandos kidnapped in Lebanon -- as bargaining chips for the release of Arad. His plane went down over Lebanon in 1986.