A former Hanafi Muslim, convicted in the 1977 takeover of three Washington buildings and then released early from prison, can remain free, a divided three-judge panel of the D.C. Court of Appeals ruled yesterday.

The ruling marked the first time in the seven-year battle between prosecutors and D.C. Superior Court Judge Nicholas Nunzio that the appellate court has sided with the judge over the fate of Hilvan Finch, also known as Abdul Hamid.

Finch was one of seven Hanafi Muslims who seized the Rhode Island Avenue NW headquarters of B'nai B'rith on March 9, 1977, while five others took over the Islamic Center on Massachusetts Avenue NW and the District Building. By the end of 72 hours, a radio reporter was shot to death and Mayor Marion Barry, then a D.C. Council member, and two other persons were wounded.

Nunzio originally sentenced Finch to a 36- to 108-year prison term for his part in holding more than 100 hostages at B'nai B'rith. He reduced the sentence in 1980 and ordered Finch's release from prison.

Since then, the appellate court has twice ordered Nunzio to return Finch to prison, but each time the judge has balked, ruling on various legal grounds that Finch can remain free. Nunzio has ordered Finch released four times; he withdrew his third order after an argument in a similar case failed with the appeals court.

Nunzio's latest ruling that was finally upheld by the appellate court occurred in 1985, when the judge said that the original sentence was "so infected with errors" that to carry it out would constitute a miscarriage of justice. Nunzio's previous rulings had been overturned on technical grounds.

In his 1985 ruling, Nunzio cited a number of factors in Finch's background that the judge said were not brought to his attention at the time of sentencing, including the fact that Finch had been a "virtual prisoner" at the Hanafi leader's home and did not know where he was going when he arrived at the B'nai B'rith building.

The judge said Finch failed to divulge this information out of fear that he and his family would be killed.

Judge Julia Cooper Mack, writing for the majority in the 43-page opinion, agreed with Nunzio, saying the original sentence rested "on a foundation of confusion, misinformation and ignorance." Mack was joined by Judge John M. Ferren. Chief Judge William C. Pryor dissented, writing that Finch did not "satisfy the burden" that would warrant the kind of "extraordinary" relief he was seeking.

U.S. Attorney Joseph E. diGenova, who previously expressed anger with the judge's refusal to return Finch to prison, said yesterday his office was reviewing the decision, but had not yet decided whether to ask all the members of the appellate court to vacate the ruling and rehear the case.

In an interview from the office of his attorney Greta Van Susteren, who represented Finch along with lawyer Timothy Junkin, Finch said he remained deeply sorry for those injured in the takeover.

"I understand that everyone does not share this victory and that not everyone is happy about it," said Finch, 32, who works as an equipment salesman in the New York area.