The director of B'nai B'rith testified yesterday that the leader of the Hanafi Muslims who took more than 100 hostages at the Jewish service organization's headquarters last March spoke of himself and his followers as "soldiers of Allah" bent on waging "religious war" who would behead their captives unless their demands were met.

"He expressed many anti-Jewish sentiments that had a great impact on me," Sidney H. Closter told the Superior Court jury. "He read words from the Koran that said Jews were destined to wander over the earth, to be despised and hated."

Testifying as the trial of 12 Hanafis charged with murder and kidnaping entered its third week in Superior Court, Closter said Hamaas Abdul Khaalis, 55, acknowledged leader of the defendants, had made anti-Jewish statements as well as insisting that five Black Muslims convicted of murdering seven members of his family in 1973 be turned over to him to receive his own form of retribution.

The anti-Semitic statements, Closter said, included charged that Jews were responsible for racial suppression in South Africa. He also said Khaalis charged that Jews had "financed" Alex Haley's best-selling novel, "Roots" about slavery in the United States.

Disputing these statements, Closter said B'nai B'rith means "Sons of the Covenant" in Hebrew, that it is "a service organization whose members are Jewish," and that it is devoted to the defense "of all minority groups, including blacks."

But he reserved his greatest outrage for his answer to a question put to him on cross-examination by Harry T. Alexander, a former Superior Court judge who is defending Khaalis.

"Are you familiar with the 'Protocols of Zion?'" Alexander asked.

"I am familiar with the anti-semitic tract widely known as the 'Protocols of the Elders of Zion,'" Closter replied. "It is an obscene tract."

"It is not endorsed by B'nai B'rith?" Alexander said.

"Obviously not," Closter said.

Closter is the first witness to be asked at length about anti-Jewish statements by the Hanafi Muslims. While other witnesses have made passing reference to such statements, they have concentrated on what happened to them during the sieges that began March 9 at the B'nai B'rith headquarters at 1640 Rhode Island Ave. NW, at the District Building at 14th and E Streets NW, and at the Islamic Center at 2551 Massachusetts Ave. NW.

One person was killed in the takeovers, which continued until the early hours of March 11, and several persons were injured.

All 12 Hanafis are accused of murder, kidnaping and related offenses in furtherance of a conspiracy to avenge the murder of seven members of Khaalis's family at their home at 7700 16th St. NW in January, 1973. The five men convicted of those crimes all are serving multiple life prison terms. A sixth remains to be tried.

Of the threats that Khaalis allegedly made, Closter said:

"We were told that this is a religious war they sought and that they were soldiers of Allah. We were threatened with decapitation, that we would lose our lives."

Besides Closter, yesterday's witnesses included two other hostages from the B'nai B'rith site and eight plice officers.

Wesley A. Hymes, who works in B'nai B'rith publications department, described how he had been taken prisoner by a Hanafi and told to go through a door.

"We went out into the corridor," he said. "There was a guy standing near the stairwell with a machete. He said, 'M'-f-, you can't hear very well, can you?' Then he started swinging a machete at me. He almost cut my thumb and finger off.

"Then I ran toward a doorway. When I was running, I got shot from behind."

Hymes said Khaalis ordered his release about 90 minutes after the incident after insisting that he "think Allah" for his deliverance.

At the request of the prosecutors, Hymes stood up in the witness box to show the jurors where he had been injured in the hand.

William C. Ferguson, another of the 149 hostages taken in the sieges, testified that he had been ordered by the Hanafis to go from the eighth floor of B'nai B'rith, where most of the hostages in that building were held, to the second floor to bring up some containers for the captors.

One container appeared to be a cello case, he testified. He said the case opened partly as he was lifting it and a cartridge fell out.

Prosecutors said in their opening statement that the Hanafis took more than 9,000 rounds of ammunition into B'nai B'rith headquarters.

On a second trip, Ferguson said, he and three other men were made to carry "a very heavy trunk" to the eighth floor.

Ferguson said that when these tasks had been completed, his hands were bound behind him with telephone wire. He said he was bound so tightly that his hands and wrists became swollen, causing the wire to cut into his flesh.

The testimony of the eight police officers yesterday established that seven of the Hanafis had been arrested at B'nai B'rith when the sieges at all three sites ended. Prosecutors Martin J. Linsky and Mark H. Tuohey III, the assistant U.S. attorneys who are trying the case for the government, thus established that a crime had been committed there.

Although the events are among the most highly publicized in the city's history, the fact that a crime occurred had to be established through testimony in court. The practical effect of the officers' testimony was to render unnecessary lengthly hearings outside the hearing of the jury on legal questions concerning identification of the defendants.

Because of the expected length of the trial, 12 alternates were chosen as well as 12 jurors. All are sequestered at an undisclosed location.

Judge Nicholas S. Nunzio excused the first of the original jurors yesterday for the reason that his jury service was costing him substantial sums of money. This is because he is a substitute employee of the Postal Service and as such does not receive from his employer the difference between his regular salary and his jury fee, which is $25 a day.