Harry T. Alexander, the former D.C. Superior Court judge who is defending Hamaas Abdul Khaalis in the Hanafi Muslim murder-kidnaping trial, was refused permission yesterday to spend the weekend in a cell in D.C. Jail with his client, the better to prepare his case.

Chief Judge Harold H. Greene of Superior Court denied Alexander's motion after a brief hearing yesterday afternoon, saying that it "totally lacks merit."

The prosecution finished presenting its evidence in the Hanafi case yesterday and the defense is scheduled to begin Monday.

Alexander told Greene that "perhaps no one - certainly I did not - expect the government to rest today. In short, the necessity (to spend the weekend in the same cell with Khaalis) did not really occur to me until this morning."

He said he tried to present his motion to Judge Nicholas S. Nungio, who is presiding over the Hanafi trial, but that Nunzio had left for the weekend.

Assistant U.S. Attorney Martin J. Linsky, one of the Hanafi case prosecutors, said the government would "take no formal position" on Alexander's request. He noted that prosecutors had given notice in court Wednesday that they had only one witness and some wire-tap evidence remaining.

Judge Greene said he believed Alexander's request was unprecedented. He then added:

"The jail is open (to attorneys) 2 1/2 hours a day, seven days week. There has been no satisfactory explanation of why these hours have not been sufficient."