A D.C. Superior Court judge has freed one of the 12 Hanafi Muslims convicted three years ago in the violent takeover of three buildings in Washington and the holding of 149 hostages.

Saying that 25-year-old Abdul Hamid was a "model prisoner" who had been rehabilitated after serving three years of his 36-to-108-year prison term, Judge Nicholas S. Nunzio effectively cut Hamid's sentence to the time he has served. He then placed him on probation, released him last Friday and ordered him to leave the Washington area.

Hamid was one of seven Hanafis who seized the headquarters building of B'nai B'rith, one of the nation's major Jewish service organizations, at 1640 Rhode Island Ave. NW in March 1977 and took more than 120 hostages. Five other Hanafis took over the District Building downtown and the Islamic Center on Massachusetts Avenue NW, seizing several more hostages, including a number of D.C. City Council staff members.

Radio reporter Maurice Williams was shot and killed and Mayor Marion Barry, then a City Council member, was wounded in a hail of Hanafi gunfire at the District Building before the Hanafis surrendered to police three days after the takeovers. The Hanafis had made several demands, including one that the government turn over to them five Black Muslims convicted of murdering seven family members of a Hanafi leader. None of the demands was met.

Hamid was convicted in July 1977 of eight counts of armed kidnaping, conspiracy to commit kidnaping while armed and assault with a dangerous weapon. He was incarcerated at a federal prison in Lompoc, Calif.

At a hearing last Friday before Judge Nunzio, government prosecutors objected to the reduction in Hamid's sentence, calling Hamid an "active and willing participant in what was probably the largest and most serious criminal offense ever to occur in the District of Columbia." a

Hamid, who would not have been eligible for parole until the year 2013 under his original sentence, apparently impressed Judge Nunzio with his educational and vocational pursuits while in prison, his cooperation with prison authorities and the fact that his role in the takeovers, according to Hamid, was minimal compared to other defendants in the case.

Hamid also corresponded with the judge from prison. In one letter, he wrote: "Throughout the siege of B'nai B'rith -- a situation in profound conflict with my sense of right and wrong -- the totality of my actions were orchestrated by those in command. For the most part, I was as much a hostage as those of which I was convicted of holding. . . ."

Hamid could not be reached for comment yesterday. His attorney, Charles F. Stow III, described Hamid as a person "who has reformed in prison. . . . He has, in short, learned his lesson.

According to court records, Hamid received an associate of arts degree from Allan Hancock College in Santa Maria, Calif., and completed engine repair and dentistry courses while in prison. He received positive evaluations from prison officials.

One of the hostages taken by the Hanafis, Hank Siegal, press officer for B'nai B'rith, objected to Hamid's release. "Naturally we are concerned because of the treatment we received," Siegal said. "We were treated uniformly with a lot of brutality."

Nunzio formally vacated Hamid's 36-to-108-year prison term, then imposed an identical sentence and suspended the entire term, placing Hamid on five years' probation. He ordered Hamid to leave the Washington area, write him annual letters keeping him apprised of his activity and report regularly to a probation officer.

Assistant U.S. Attorney Paul L. Knight objected in court to Nunzio's ruling, arguing that the judge lacked authority to vacate Hamid's sentence in its entirety. Under court rules, Knight said, a judge may reduce or modify a prison sentence, but not eliminate it.