A D.C. Court of Appeals panel has reinstated for the second time the prison sentence of Hanafi Muslim Abdul Hamid, who was convicted for his role in the seizure of more than 120 hostages at B'nai B'rith headquarters here in 1977 but then freed by a Superior Court judge.

In a unanimous opinion, the three-judge panel ruled yesterday that Judge Nicholas S. Nunzio erred in September 1981 when he ordered Hamid released from jail on the grounds that he had not been effectively represented by counsel.

Hamid's attorney had filed a request for a reduction in Hamid's sentence two days before Nunzio's authority over the case expired, and Nunzio ruled later that the late filing constituted "per se" ineffective assistance of counsel because it didn't allow him enough time to adequately consider the request.

Hamid had been sentenced to a term of 36 to 108 years on eight counts of kidnaping and assault and had served three years in jail at the time of his release. Normally, he would not have been eligible for parole until 2013.

"The Sixth Amendment right to the effective assistance of counsel does not apply to the post-conviction process in seeking a reduction of sentence," Appeals Judge Frank Q. Nebeker wrote in the panel's opinion.

Hamid's lawyer, Timothy D. Junkin, who was not involved in the request for a reduction of Hamid's sentence, had no comment on whether his client would appeal.

During his trial along with a group of other Hanafi Muslims charged in the 39-hour takeovers of B'nai B'rith headquarters, the District Building and the Islamic Center in March 1977, former hostages at B'nai B'rith testified that Hamid had held a gun to their heads and issued orders. One of the hostages testified that Hamid hit him in the eye with the barrel of a gun and struck him in the mouth with his fist.

Yesterday's decision marked the third time that the appeals court had ruled on the case. It upheld Hamid's conviction in 1979, a decision that the U.S. Supreme Court refused to review a year later.

Hamid then had the right to ask for a reduction of his sentence, and his lawyer filed the request for a reduction 118 days after the conviction was upheld. Under D.C. law, Nunzio had jurisdiction over the case for 120 days after the Supreme Court action.

But on Jan 4, 1981, six months after the 120-day limit had expired, Nunzio reduced Hamid's sentence to time served and imposed five years' probation, contending that Hamid had played a small role in the takeovers and that he had been a model prisoner who had rehabilitated himself.

Hamid was freed immediately and the government appealed. In May 1981, the appeals court ruled that Nunzio had improperly reduced Hamid's sentence after he had the legal authority to do so.

Hamid turned himself in to the judge in July 1981. Two months later, Nunzio again ordered Hamid freed, this time lifting the parole condition and ruling that his attorney's filing of the request for a reduced sentence on the 118th day of the 120-day deadline constituted ineffective assistance of counsel.