An armed guard -- part of a 24-hour security watch -- sits outside the D.C. General Hospital room of Alan Berkman, a federal prisoner since May 1985. Inside, Berkman, who suffers from lymph cancer and is physically drained from intensive chemotherapy, rests in a chair next to a windowsill that holds get-well cards and books on philosophy and religion. Partially paralyzed, he is attached to an abdominal catheter. Prison leg irons -- the stiff medicine of his jailers -- shackle his feet.

The armed guard and chains symbolize the needlessly harsh treatment of Berkman, a graduate of Cornell University and Columbia University medical school. A combination of forces -- the FBI, Department of Justice and U.S. Parole Commission -- has made Berkman's case a study of governmental harassment gone out of control because vengeance is more honored than justice.

Berkman, who is 45 and married to an emergency room physician who serves at Our Lady of Mercy medical center in the Bronx, is a sick man, a cancer patient in and out of critical condition. He has been eligible for parole since 1987. Now, after more than 65 months in prison, he is well beyond the parole commission's guideline of between 46 and 64 months for the usual felon.

Berkman was convicted in a Pennsylvania federal court. The most serious charge was unlawful possession of firearms and explosives. He was arrested by the FBI near a Doylestown, Pa., garage in which explosives were stored. Prosecutors charged he was a member of a clandestine organization committed to using those explosives in violent revolution. They asked for a sentence of at least 48 years, with no early parole.

Despite never having been convicted of any bombing, Berkman was viewed as a big catch -- a radical leftist doctor eager to blow up who-knows-what in the name of anti-imperialist mayhem. He kept bad company too, including some black nationalist groups the government was snooping into. In 1982 Berkman refused to supply a grand jury with information about them, and was imprisoned for nine months. In another case, he jumped bail after being indicted for treating the wounds of a fugitive and not turning her in. He was the first doctor to get that rap since 1865 when Dr. Mudd allegedly treated John Wilkes Booth.

The judge, not buying the prosecutor's claims about Berkman's dangerousness and the necessity of 48 years, issued a 10-year sentence, with parole eligibility in about four years. He "strongly recommended" that the physician be given the chance to use his medical skills in prison. Instead, Berkman was dispatched to the Marion, Ill., prison, the hellhole of the federal system.

It was in 1971 that Berkman first encountered prison life -- as a young doctor who treated the wounded in the Attica, N.Y., prison revolt and documented the physical abuse of inmates. Two years later, he was in South Dakota offering medical care to protesters at Wounded Knee.

By now, Berkman was the kind of physician that every medical school should strive to produce: a compassionate healer unconcerned about money or prestige. For the next nine years he practiced community medicine among poor families at health clinics in Lowndes County, Ala., Boston and the South Bronx.

In his hospital room the other afternoon, the shackled Berkman was dispassionate in recounting the delays and botchings he has endured in trying to get treatment of his cancer. While in prison infirmaries, he has been shackled to a bed around the clock. Berkman will be automatically free in 20 months -- if he survives the cancer first diagnosed in 1985.

The continued imprisonment of a man who may well be dying illustrates that the Justice Department's obsession with hounding dissidents -- thought to have abated in the post-J. Edgar Hoover years -- still thrives. Recent months have seen a mounting outcry against the treatment of Berkman. Members of Congress have protested to the parole commission, as have the American Public Health Association, the National Lawyers Guild and fellow physicians from medical school faculties at Harvard, Columbia and Boston universities. The commission's response has not deviated from the government's original damning of Berkman as a committed revolutionary not to be given parole.

Selective justice is at work. In 1985, the year of Berkman's imprisonment, a Maryland man was found guilty of bombing 10 abortion clinics. He was sentenced to 10 years and paroled in less than four. Also in 1985 a pair of Florida bombers blew up four abortion clinics. They are now in halfway houses.

A New York medical program that cares for drug addicts has promised to hire the doctor on his release from prison. Asking the commission that Berkman be paroled now, the director calls him "a gifted physician" with a "rare commitment" to serving the poor. Contrast that view with the one of the prosecutor who said last week that Berkman remains a "committed revolutionary" not entitled to parole. And of his illness? "I'm not going to start crying because he has cancer."