On Dec. 11, 1980, David L. Dent, a 35-year-old unemployed maintenance man, was indicted by a D.C. Superior Court grand jury on charges of armed robbery, kidnaping and sexual assault.

He has consistently said he is innocent, and he has never been tried on the charges. But he spent 11 months in D.C. psychiatric wards before a judge, based on the evaluations of a divided group of doctors, decided he was mentally ill, incompetent to stand trial and unlikely to become competent in the future. The U.S. attorney's office then asked the D.C. Superior Court Mental Health Commission, a court-appointed panel of two psychiatrists and a lawyer, to commit Dent to an institution on the grounds that he was dangerous.

After a hearing the commission determined, according to a report filed in court, that although three psychiatrists believed Dent was mentally ill, he could not be committed because he did not meet the legal requirement for commitment: that he be found to be dangerous as a result of his illness.

Today Dent is a free man, living with an aunt in Northeast Washington, and unlikely ever to stand trial on the charges on which he was indicted.

Although what happened to him is unusual--veteran lawyers estimate that such cases might occur twice a year--it points to an apparent gap in the system. On the one hand, Dent spent more than a year in confinement even though he was never convicted of a crime. He received treatment while psychiatrists were evaluating his competency, but after it was determined that he could not stand trial the court was unable to provide treatment for him nor order him to obtain it.

On the other hand, a serious crime was committed for which no one has been tried, leaving prosecutors, police, victims and psychiatrists frustrated and angry.

The outcome of the case was "a sad thing," said D.C. Police Detective Susan Roberts, who arrested Dent. "It's one thing if he's going to be in St. Elizabeths," she said. "It's another thing if he's going to be out on the streets."

Janice Armstrong, who was attacked at knifepoint in September 1980 on Capitol Hill, was frustrated by the fact that the case never came to trial. "I feel angry, but I'm not terribly surprised," she said. "I've heard enough about sexual assault cases to know you don't often get convictions. It's a real shame . . . . It was the most terrifying experience I've ever had."

Mental health commission chairman James Gardiner, a lawyer, said the existence of criminal indictments alone was "not enough" for the commission to order Dent to be committed.

"The hospital failed to convince myself or the commission regarding dangerousness," he said.

"As far as I am concerned," said Robert Madsen, a staff psychologist at St. Elizabeths Hospital who testified before the mental health commission on Dent's case, "we don't care about guilt or innocence. That is not our function; that is the function of the trial courts. We render opinions regarding mental illness."

Defense lawyers and prosecutors declined commment on the case. Dent could not be reached for comment.

According to court records, Dent has one conviction, for petty larceny in Maryland in 1979. The records state that he repeatedly told psychiatrists he was innocent of the kidnaping, armed robbery and sexual assault charges and that his arrest was a case of "mistaken identity."

Only 37 of about 3,000 persons charged with felonies in D.C. Superior Court in 1980 were declared incompetent to stand trial by virtue of mental illness, the records show. Most incompetency rulings come in connection with misdemeanor cases: Of more than 1,000 persons screened for competency last year, 322 were found unable to stand trial and 285 of those were charged with misdemeanors.

Chief Judge H. Carl Moultrie I declined to release statistics on how many of those declared incompetent to stand trial in felony cases are, like Dent, not committed under civil procedures to mental institutions. But lawyers familiar with the system said they doubted the number would be more than two or three a year.

"We get most of them," said Gardiner. He estimated that situations such as Dent's might arise only once a year or so.

Such cases occur because of the problems inherent whenever psychiatry and the law come together, several lawyers said. "Doctors and lawyers simply don't mix," said one veteran defense lawyer. Despite years of controversy and numerous attempts to improve the system both here and in jursidictions around the country, he said, "no one is really happy with the way things work."

Dr. Richard A. Ratner, a psychiatrist involved in Dent's case as a consultant at St. Elizabeths, said he "was not real satisfied" and felt "personally frustrated" with the "troublesome case."

"The machinery of the law works in a way that may seem strange" to the general public, Ratner said. According to reports filed in court during Dent's evaluation, Ratner believed that Dent was competent to stand trial and was "willfully evading the legal issues."

But other doctors at St. Elizabeths and an outside psychiatrist brought in by Judge Truman A. Morrison III filed reports saying that Dent could not fully understand what was happening to him in the court system and could not assist his lawyers in presenting a defense--the two criteria for determining whether someone is able to stand trial.

Morrison eventually ruled that Dent was incompetent and allowed the prosecution 30 days to file a petition to commit Dent under civil procedures. A hospital petition, certified by Ratner, was sent to the Commission on Mental Health recommending that Dent be committed to an institution. That is the standard procedure when persons accused of felonies are unable to stand trial as a result of mental disorders.

But the law for civil commitments requires the commission to find not only that a person is mentally ill, but that as a result of his illness he is dangerous to himself or others.

Ratner, St. Elizabeths staff psychologist Madsen and psychiatrist Raymond Patterson testified at the commission hearing last November. All three agreed that Dent was mentally ill, according to the commission's report. Madsen had diagnosed Dent as suffering from an "unspecified mental disorder," which he said in an interview was a "catch-all phrase."

Ratner testified that Dent was in fact "a danger to himself and others," while the other two doctors said he was not, according to the commission's report.

"I wouldn't want that guy baby-sitting for me," Gardiner said in an interview, but "we had no way to commit him . We're bound by what we had presented to us."

The U.S. Attorney's Office has requested a hearing, scheduled for April, to see if Dent is then competent to stand trial. According to court records, however, the psychiatric finding last year was that Dent was not only incompetent to stand trial but unlikely to become competent in the forseeable future.