Cecile Von Goetz testified yesterday that she lied about having a heart condition to gain her freedom from Hanafi Mushins who allegedly took her hostage last March at the Islamic Center along Washington's "Embassy Row."

In a sometimes quavering voice, Von Goetz related details of her successful ruse with one hand family gripping the microphone in a crowded courtroom, and with her eyes sometimes closed.

"I gave them the number of my doctor and they telephoned," she told the D.C. Superior Court jury. "I talked to the receptionist, who happens to the my cousin. I said, 'Do you remember the very serious heart condition the doctor diagnosed for me recently?' She said she did and they released me."

"Do you have a heart condition?" asked Stephen J. O'Brien, a defense attorney.

"No," said Von Goetz.

O'Brien then asked how long after she had "concocted" her story that she had been released.

The word "concocted" set off a string of objections from the prosecution and Judge Nicholas S. Nunzio intervened.

"Did you lie about anything in this courtroom" Nunzio said.

"No," said Von Goetz.

Nunzio then turned to the jury.

"We're here to seek out the truth in the interests of justice," he said. "I ask questions for your benefit."

The brief but heated exchange came toward the end of the 10th day of testimony in the trial of 12 Hanafi Muslims on charge of murder and kidnaping arising from the takeover of the Islamic Center at 2551 Massachusetts Ave. NW, the International headquarters of B'nai B'rith, the Jewish service organization, at 1640 Rhode Island Ave., NW, and the District Building at 14th and E Streets NW.

It was a day marked by further clashes between Nunzio and Harry T. Alexander, a former Superior Court judge who is representing Hamaas Abdul Khaalis, 55, alleged leader of the sieges.

Alexander was examining the Rev. Robert Tesdell, who was taken hostage at the Islamic Center along with Von Goetz and nine other persons last March 9. Tesdell said his captors had relayed orders from Khaalis that Dr. Muhammad A. Rauf, director of the center, call the embassies of Moslem nations in Washington and New York and demand that the film "Mohammad, Messenger of God" be removed from this country. He said the Hanafis at the center threatened to kill Rauf immediately if he did not follow orders.

Alexander asked why Tesdell had not included this information in the statement he made to police after he was released in the early hours of March 11.

"I was very sleepy at this time," Tesdell replied. "I had had only three hours of sleep in three days."

Handing over the statement he had made to police, Alexander asked Tesdell to "try" to remember why the threats against Rauf had been omitted.

"Try what, sir?" said Nunzio.

"Try to remember," said Alexander.

"That's an improper statement to make to a witness," said Nunzio, his voice rising.

"Your Honor, I object to that," said Alexander.

"Mr. Marshal, take the jury out," said Nunzio. "Gentlemen, approach the bench," he ordered the lawyers.

There followed a bench conference. Although bench conferences are part of the record of a trial, what passes during them is kept confidential. It could not be learned whether Judge Nunzio had disciplined Alexander.

Earlier this month, a microphone was left open during a bench conference and Nunzio was heard to tell Alexander that he would cite him for contempt of court unless Alexander obeyed his rulings. Nunzio later apologized to Alexander for the fact that this statement had become public through "electronic error."

Much of yesterday's court session was taken up with testimony from police officers to establish the "chain of custody" for a small arsenal of weapons seized at the B'nai B'rith building.

That was the first location taken over March 9. Khaalis and six other defendants are accused of having taken part in that incident. Three are accused of taking part in the siege at the Islamic Center and two with taking over the District Building.

In all, 149 hostages were seized and more than 100 of these were at B'nai B'rith headquarters. One person was killed at the District Building and several others were injured there and at the other locations.

All 12 Hanafis on trial are charged with the murder at the District Building. The prosecution theory is that the murder and the kidnapings took place in furtherance of a conspiracy, the purpose of which was to compel officials to turn over to Khaalis five Black Muslims convicted of murdering seven members of his family in January, 1973.

Most of the hostages were held from March 9 until the sieges ended early March 11.

Von Goetz testified that as a result of her story about a heart condition, she gained her release after about 25 hours of captivity.

She was Rauf's secretary at the Islamic Center and she said she was in her office when she first noticed trouble. She said she and the other prisoners repeatedly were threatened with death unless the Hanafis' demands were met.

Von Goetz said that in addition to their demands about the film and the convicted murderers, the Hanafis wanted Wallace Muhammad, head of the Black Muslim movement, and "Cassius Clay", the former name of world heavyweight boxing champion Muhammad Ali, turned over to them.

The 12 Hanafis on trial sat silently through the testimony. Court sources said they were still maintaining a protest fast they began last week.