BEIRUT, Lebanon (AP) _ Iran's official news agency said two German relief workers, the last Western hostages in Lebanon, were freed tonight and handed over to Lebanese security officials.

The Beirut bureau of the Islamic Republic News Agency cited an unindentified source in its brief dispatch. There was no immediate confirmation of the report.

''They ceased to be in the kidnappers' hands. They are in the hands of Lebanese security authority authorities since after 8 p.m. (1 p.m. EDT),'' IRNA said.

The report gave no other details. It came about a half-hour after the Holy Warriors for Freedom, the group that claimed responsibility for kidnapping of the two Germans, said they would be released at Lebanese President Elias Hrawi's residence in Beirut within 48 hours.

Heinrich Struebig, 51, and Thomas Kemptner, 30, were the last Westerners held by kidnappers in Lebanon. Most of the score of foreigners taken prisoner since 1984 were held by pro-Iranian Shiite Muslims.

Bernd Schmidbauer, an envoy for Chancellor Helmut Kohl, met today in Damascus with Syrian Foreign Minister Farouk al-Sharaa to discuss the hostage release.

''I believe we're going to Beirut tomorrow ... to take them (the hostages) home with us,'' Schmidbauer said.

A Lebanese security source said the Germans were moved to a basement jail in southern Beirut last week in preparation for their release. The source, who spoke on condition of anonymity, said they earlier had been held separately at a sheep farm in Lebanon's Bekaa Valley and in a southern Beirut fishermen's slum.

The pro-Iranian kidnappers had sought to trade the Germans for two Lebanese brothers jailed in Germany on terrorism charges, but Germany refused to pardon the brothers.

The Beirut newspaper As-Safir, which is close to both Syria and Iran, said an Iranian envoy went to Beirut last week and conveyed to the kidnappers ''positive proposals regarding the future of the Hamadi brothers.''

The statement from the Holy Warriors said the decision to release Struebig and Kemptner came in response to the international efforts and mediation by Lebanon, neighboring Syria and Iran.

''As we release the last spies and positively close this chapter, we warn against a repetition of past experiences. We have started the countdown for the completion of the happiness for all, otherwise no one will enjoy happiness if our brothers are not released,'' the handwritten statement said.

''We renew our vow that we shall not rest until freedom is returned to our brothers and this will be the last chance,'' it said.

Iranian officials had said Sunday that the hostages' release was expected no later than Wednesday. Iran played a major role in trying to persuade the kidnappers to free the Germans.

The United Nations' hostage mediator, Giandomenico Picco, also had been in Lebanon or Syria working on the Germans' release, U.N. sources said on condition of anonymity. Picco was instrumental in freeing the last American and British hostages in Lebanon last year.

Struebig and Kemptner were working for the German humanitarian group ASME- Humanitas at Palestinian refugee camps when they were kidnapped May 16, 1989. Unlike most of the other Westerners who were abducted for political reasons, the Germans' captors wanted to exchange them for the Hamadi brothers, who are jailed in Germany on terrorism convictions.

Mohammed Ali Hamadi is serving a life sentence for the 1985 hijacking of a TWA jetliner to Beirut and the killing of U.S. Navy diver Robert Stethem. He is being held in Schwalmstadt prison in central Germany.

His brother, Abbas Hamadi, is serving a 13-year sentence at Saarbrueken prison in southwestern Germany. He was jailed in 1987 for the kidnapping of two other Germans who were freed in Beirut in 1989.

The As-Safir report said Germany has ''raised the possibility that they (the Hamadi brothers) could be held in the same prison, their treatment could be improved and their families be allowed to visit them regularly.''

The group that kidnapped Kemptner and Struebig is believed to be headed by Abdul-Hadi Hamadi, elder brother of Mohammed Ali and Abbas. He is security chief for Hezbollah, a pro-Iranian group that has served as an umbrella for Lebanese kidnappers.

At least 92 foreigners were abducted in Lebanon between 1984 and 1991. Most were freed or said they escaped, but eight died or were killed in captivity and three others are believed to be dead.

The last hostage released was Associated Press correspondent Terry Anderson, who was freed in December after nearly seven years in captivity.