FRANKFURT, West Germany (AP) _ Security at the Athens airport was virtually non-existent when a TWA airliner was boarded by terrorists in 1985 and hijacked to Beirut, a passenger testified during the trial of Mohammed Ali Hamadi.

Australian William Henderson, 56, told the court Wednesday that he was traveling with his family and was amazed at the lax security just prior to the the Athens-to-Rome flight.

''There was no security there at all. I walked out to look at the tarmac and came back in. No one stopped me,'' said Henderson.

Henderson said electronic security devices did not detect a knife he carried. ''I had a small pocket knife in my pocket, which I always carry. It did not set any security check off.''

''I wondered why it didn't because it always had before,'' at other airports, the retired school principal said.

The court has been trying to determine how weapons, including a chrome- plated pistol and hand grenades, were smuggled onto the June 14, 1985, flight. Hamadi has refused to say how the weapons were taken on board.

Greek officials repeatedly have asserted that security measures at the airport were adequate before the hijacking ordeal, during which U.S. Navy diver Robert Stethem was shot to death.

Henderson's wife, Rosemarie, 52, told the court Wednesday that Stethem had talked with her daughter after the hijackers had beaten him.

Mrs. Henderson said that before he was shot, Stethem told her daughter, Ruth, that he hoped the hijackers would pick him and not his five married Navy colleagues on board if they were going to kill someone. Stethem, 23, of Waldorf, Md., was single.

''He said to her that if anyone would have to be killed, he hoped it would be him, because the others (five fellow divers) were all married,'' Mrs. Henderson said, her voice breaking with emotion.

Mrs. Henderson said her 19-year-old daughter would not be able to testify before the three judges and five jurors until November.

Chief Judge Heiner Mueckenberger had hoped to end the trial by the end of year but said Wednesday it would likely extend into next year because of problems scheduling some witness' testimony. The trial was recessed Wednesday until Oct. 11.

The court did not ask Mrs. Henderson where the family lived in Australia, or which school her daughter attended, in keeping with its policy on protecting witness security.

Waving her hands occasionally, Mrs. Henderson also told of how Hamadi and TWA flight attendant Uli Derickson led Stethem down the airplane's aisle after he had been beaten.

''The young man (Stethem) was crying. He was unable to walk by himself,'' said Mrs. Henderson.

Stethem was shot and killed by one of the hijackers when the plane landed in Beirut a second time after returning there from Algiers.

Hamadi, a Lebanese Shiite Moslem, has confessed to being one of the two gunman who hijacked the airplane but has denied firing the shot that killed Stethem.

Hamadi is being tried in a heavily guarded courtroom inside Frankfurt's Preungesheim prison. Several dozen police armed with machine guns and other weapons patrol the area during court sessions.

In addition to killing Stethem, the hijackers held 39 Americans captive for 17 days.

When Hamadi and Stethem arrived at their seats, Mrs. Henderson said the defendant ''pointed the gun at my husband and said 'out' and they placed him in another seat. They placed the young man next to me.''

''He was in shock. He also had a bandage around his neck. It had blood on it,'' Mrs. Henderson said.

Mrs. Henderson said that she later switched seats with her daughter and that her daughter talked to the injured sailor at length.