Twelve Hanafi Muslims were indicted yesterday for murder, armed kidnaping, assault with intent to kill, conspiracy and related offenses in connection with the takeover March 9 of three Washington buildings and the holding of 139 hostages.

A 32-count indictment returned by a federal grand jury charged that the purposes of the conspiracy were to compel authorities to turn over to Hanafi leader Hamaas Abdul Khaalis the persons convicted of murdering seven members of his family in January, 1973, and to have the movie "Mohammad, Messenger of God" removed from this country.

"It was further a part of the said conspiracy that the hostages would be murdered if demands were not met or if law enforcement officials attempted, by force, to rescue the hostages," the indictment said.

Of the 32 counts charged, 29 carry a maximum sentence of life imprisonment.

The scope of the indictment indicated that federal prosecutors plan to press the charges to the hilt. Although only one person was killed in the takeovers, all 12 of the defendants are accused of felony murder in the first degree - that is, murder committed during the perpetration of another illegal act in which all took part. The other alleged act in this case is armed kidnaping.

All 12 also are accused of second-degree murder by reason of the law of conspiracy. The indictment asserts that the murder was committed "in the course of and in furtherance of the conspiracy."

A federal grand jury returned the indictment before Chief Judge Harold H. Greene of D.C. Superior Court. Greene thanked the jurors for carrying out "a very serious responsibility."

It was later learned that Greene had appointed Judge Nicholas S. Nunzio to try the cases. Nunzio, a former federal prosecutor, has been a judge of the Superior Court for the past seven years and has had wide experience in major criminal cases.

Assistant U.S. Attorneys Martin J. Linsky and Mark H. Tuohy III, the prosecutors assigned to the case, said they expected the defendants to be arraigned on the charges within the week. The purpose of an arraignment is to give an accused formal notice of the charges against him, and to give him an opportunity to plead guilty or innocent.

Tuohy and Linsky said they would be prepared to go to trial by the end of this month.

Khaalis, 54, the Hanafi leader, is entitled to go on trial by May 31. This is because he was jailed March 31 without bond on orders from Judge Greene. From March 11, when the sieges at the three buildings ended, until March 31, he had been free without money bond.

Greene had placed him on that status March 11 because it was part of the arrangements worked out by city and federal officials in negotiations with Khaalis for the release of the hostages.

On March 31, U.S. Attorney Earl J. Silbert asked Greene to revoke Khallis' release on the ground that he had committed another crime - threatening to do bodily harm - and on the further ground that there was no way to ensure that he would not pose a further danger to the community.

The pretrial detention laws give Khaalis the right to a trial within 60 days of the time he was jailed. It could not be learned last night whether his attorney, former Superior Court Judge Harry T. Alexander, would seek a delay.

The other 11 defendants also are in jail. They are being held in lieu of $50,000 surety bonds.

Another Hanafi, Abdul Aziz, Khaalis' son-in-law, was arrested March 31 and charged with a violation of a federal gun law. He is currently free on a $50,000 bond, his family having posted $5,000 with the court. Aziz was not indicted yesterday.

The takeovers began about noon March 9 when Khaalis and six followers entered the international headquarters of B'nai B'rith, the Jewish service organization, at 1640 Rhode Island Ave. NW and took 113 hostages.

Later the same day three Hanafis took over the Islamic Center at 2551 Massachusetts Ave. NW, along "Embassy Row," and held 11 persons hostage.

The third location was the District Building at 14th and E Streets NW. Abdul Muzikir, 22, also known as Marquette Anthony Hall, and Abdul Nuh, 28, also known as Mark E. Gibson, allegedly took 15 hostages at the District Building.

Linsky and Tuohy said the exact number of hostages - 139 - had been determined during the investigation of the incidents. Officials had said previously that the total was 134.

Yesterday's indictment accused Muzikir of the shooting death of Maurice Williams, a 24-year-old reporter for radio station WHUR, at the District Building. It also accused him of the wounding of D.C. City Council member Marion S. Barry, Robert J. Pierce, 51, a retired State Department worker, and Mark W. Cantrell, 45, a building guard. All three were shot at the District Building.

The 11 other defendants also were accused of these crimes. All 12 also were indicted for assaulting Wesley A. Hymes, 30, with a pistol at B'nai B'rith headquarters.

Abdul Adam, 32, also known as George W. Smith, was charged as an individual in the indictment with assaulting Alton W. Kirkland, 21, at B'nai B'rith with a knife.

Finally, the indictment charges all 12 defendants with 24 counts of armed kidnaping - eight named persons at each of the three locations. It was understood that prosecutors did not seek kidnaping indictments in respect to each of the 139 hostages for reasons of judicial economy.