BEIRUT, SEPT. 7 -- West German hostage Alfred Schmidt was freed at dawn here today after his pro-Iranian kidnapers said they had received unspecified "guarantees" from the Bonn government. Schmidt flew home to West Germany this evening.

The government in Bonn denied that it had struck a deal with Schmidt's kidnapers to obtain his release or to attempt that of West German hostage Rudolf Cordes, who is still being held. Both were seized in January after West German police arrested accused Lebanese hijacker Mohammed Ali Hamadei at the Frankfurt airport when explosives were found in his suitcase.

Schmidt arrived at the Cologne-Bonn airport late tonight, Deutsche Presse-Agentur, the West German news agency, reported. After his release, he was driven to Damascus, Syria, turned over to West German authorities without fanfare and taken to the airport.

Schmidt looked pale, thin and tired in Damascus, but told a DPA reporter, "It's wonderful to be free again, at long last."

"The treatment was proper. I was not mistreated," he said, adding that physically he felt "OK, about 50-50."

Iran and Syria, responding to extensive West German diplomatic efforts over the summer, apparently played an important role in securing Schmidt's freedom, West German government sources told Washington Post correspondent Robert J. McCartney in Bonn.

These sources acknowledged that Schmidt's release was made possible in part by Bonn's refusal to extradite Hamadei to the United States to face trial for the 1985 hijacking of a TWA jetliner and the murder of one of its passengers. He is to be tried in West Germany on the same charges that he would have faced in Washington.

West German government spokesman Friedhelm Ost, speaking to a news conference, denied reports that Bonn had agreed to free Hamadei or his brother, Ali Abbas Hamadei, who also is jailed by West Germany. Both brothers are currently imprisoned in Frankfurt.

The Bonn government sources said it was possible that Siemens AG, which employed Schmidt, and Hoechst AG, which employed Cordes, had agreed to pay a ransom or made other arrangements with the kidnapers. The two companies have been "very active," a Bonn official said.

It also was possible that some middlemen in the negotiations had made offers to the kidnapers without authorization from the West German government, the Bonn official said. "It's very hard to say what kind of messages were transmitted by these people," the official said.

"The federal {West German} government certainly has not made any promises," he said.

A spokesman for Siemens denied it had paid a ransom for Schmidt's release. Recent West German news reports have quoted unidentified sources as saying a ransom of millions of dollars was being considered.

Bonn government sources said West Germany's diplomatic activities in the Middle East in the past few months have been oriented toward improving relations with Iran and Syria in hopes of obtaining their help in winning the hostages' release. A West German decision to unblock about $39 million allocated for commodities purchases and the financing of a cotton oil plant in Syria last month, as well as the appointment of a new West German ambassador to Damascus in June, may have played a role in Schmidt's release. Diplomatic and economic sanctions were imposed on Syria last year amid accusations of its involvement in terrorism.

Schmidt's kidnapers, the Strugglers for Freedom, announced his release in a statement this morning and thanked Syrian officials who "helped and guaranteed a settlement and who have had a role in this positive ending." The statement also underlined the "indebtedness" of West Germany to the countries instrumental in securing Schmidt's release.

The statement said that "after obtaining the guarantees and agreed-upon promises needed to ensure the interests of all according to a set schedule, hostage Alfred Schmidt will be freed as a natural result of positive attitudes mentioned earlier."

On Aug. 25, the kidnapers released a videotape of Schmidt in which he read from a prepared statement and urged Bonn to free Hamadei. The statement read by Schmidt also asked for a pledge by Bonn to distance itself and its foreign policy from the United States and for West Germany's continued shift toward "neutrality" in the Iran-Iraq war. West German Foreign Minister Hans-Dietrich Genscher declared recently that Iraq was at fault for starting the gulf war.

Today's statement warned the West German authorities to honor the guarantees and promises made to "certain countries."

"We point to the sensitivity of this issue. This cannot be a game. Germany is now indebted in certain issues and in international forums," the statement said.

Several high-ranking Iranian diplomats recently have visited West Germany, which is one of the few major western countries to maintain cordial relations with Tehran.

The Iranians and Syrians told the West Germans repeatedly that they were doing all they could to help the hostages, the Bonn government sources said. They noted that the Iranian government gave West Germany several hours advance notice that Schmidt was to be released.

It was still not clear whether Cordes' freedom was imminent or conditional on the fulfillment of certain conditions. "The kidnapers will probably say that he's their last resource now" for influencing the Hamadei cases, the Bonn official said.