For six weeks, Winfred Brown sat in D.C. Jail telling authorities something they'd heard a million times before: You've got the wrong man.

This time, the prisoner was right.

Police and prosecutors had insisted that Brown was in fact a man named Johnny T. Jones, and on that basis had locked him up on an arrest warrant. Brown insisted all along that he didn't know any Johnny Jones or what the warrant was for and that he was Winfred Brown, a 30-year-old drifter who just happened to be passing through town.

A fingerprint check would have shown clearly that Brown was Brown and not Jones. But despite the involvement of five judges, five prosecutors and three defense lawyers -- and despite Brown's loud and frequent protests -- he remained in jail wrongly accused for six weeks.

"I went through everything that was within my means to let them know, and they still just held me," Brown recently said of the events that kept him behind bars under the name of Johnny T. Jones from Sept. 4 to Oct. 17 of last year. "It's like, just shut up and go back to jail."

The mistaken identity stemmed from what since has been determined was a simple slip in clerical procedures at D.C. Superior Court. In fall 1982, for still-unexplained reasons, a prosecutor filed a misdemeanor complaint charging destruction of property against Johnny T. Jones using a police identification number that previously had been assigned to Brown, who had had his own run-ins with the law.

Two years later, in fall 1984, the duplication ensnared Brown. Stopped by police as he was leaving a Thomas Circle drugstore, Brown saw his name routinely put through a police computer and linked to Jones and an outstanding warrant for the destruction of property charge.

Protests did no good. Alibis are commonplace for suspects. There are similarities between Brown and Jones -- both are black men, they have similar features and they were both were born on Dec. 24 just two years apart.

The error went undetected and was compounded. Prosecutors wrongly insisted -- and the court was convinced -- that fingerprint evidence showed conclusively that Brown was Jones. Brown continued his protests, and prosecutors suggested that he had a mental problem.

Only when Brown's attorney did his own fingerprint inspection was the error recognized and Brown freed. Only when The Washington Post looked into the case was the clerical error identified as the reason for the mistaken identity.

The story of Brown's misfortune shows what devastating consequences a simple clerical error can have in a system that makes fundamental decisions, such as who goes to jail and where people are identified, by numbers, their histories told in court jackets.

Some officials privately said they are surprised that such mistakes do not occur more frequently because hundreds of defendants pass through the courts each day and many people from different agencies have access to computer files.

And, the error has caused some alarm.

"This kind of thing is not supposed to happen. We all take this business very seriously," said one high-ranking source in the U.S. attorney's office, which last week launched an investigation into the incident following inquiries from a reporter. Prosecutors will say little more.

"I thought it was despicable, awful and disgusting," said Brown, who now lives in a motel in Phoenix, where he says he sells jewelry. "Sometimes I just wanted to run out of that courtroom. It's the stupidest thing that ever happened in my whole life."

According to Brown, he had been in Washington just a few days after arriving here from Los Angeles when he and two other men were stopped by police outside the Peoples Drug Store at 14th Street and Thomas Circle NW last Sept. 4.

Brown said he still is not sure why he was detained. But as he stood spread-eagle against the police cruiser, the officers checked the police computer records and found that a warrant was outstanding against a man with Brown's police identification number.

"They said they had a warrant for Johnny T. Jones. I told them I didn't know any Johnny T. Jones."

Brown said he gave police a copy of his birth certificate and other documents identifying him as Winfred Edward Brown. Nonetheless, police took him to court.

That Sept. 4 arrest was not the first time Brown had been involved with the courts here.

Originally from Portsmouth, Va., Brown in 1977 was charged with procurement and false pretenses for allegedly offering to provide an undercover officer with a woman for sex. At that time, Brown was given a permanent identification number by the police records division: 315-087.

Those charges were dropped, but in 1978, Brown was convicted of unlawful entry at a bus station here. Later he spent some time in prison in Norfolk, before traveling to the West Coast.

And on Nov. 22, 1982, Brown said, he was living in Los Angeles. That day, D.C. police went to the Southeast Washington home of Johnny Jones and arrested him for allegedly breaking an automobile windshield to steal the inspection sticker.

Jones, who had previous convictions for burglary and grand larceny here as well as for robbery in Maryland, was booked and fingerprinted on a misdemeanor count of destruction of property.

Records show that police found Jones' correct identification number: 267-870. The number appeared that morning beside Jones' name on the police list of defendants awaiting court arraignment. The correct number also was given to the city's bail agency, D.C. Pretrial Services, which outlined for the court Jones' personal background and criminal history.

But in the U.S. attorney's office, a mixup occurred. The number placed on the complaint against Jones was not 267-870 but 315-087. Clerks copied that number on the court file.

How the error was made remains a mystery. Prosecutors and police theorize that the similarities between Brown and Jones may have led a clerk or a police officer to pull the wrong number out of a list of Joneses contained in computer files. Police records list Brown as having an alias of John B. Jones.

Court officials said the error might have gone unnoticed. The misdemeanor case against Jones progressed uneventfully through the courts while Jones remained free on his personal recognizance.

But four months later, on March 12, 1983, Jones appeared in court on a felony charge of armed robbery in a purse snatching. This time the court recorded his correct identification number -- 267-870 -- and Jones was held at D.C. Jail when he failed to post $2,500 bond.

Meanwhile, the judge presiding over the windshield case, Warren R. King, discovered something amiss when Jones did not appear in court as scheduled with his attorney, who at that time was John A. Briley.

"Your honor, Mr. Jones is in custody," the court clerk told King on May 17. "The reason there is a problem, he is under a different police identification number. He is in jail on two felony charges."

"All right," King responded, according to a transcript of the proceedings. But the court did not correct the mixup in identification numbers and the windshield case was called 10 more times during the next seven months, each time without Jones.

On Dec. 6, a new defense attorney, Gerson Simon, and a new judge, Virginia Riley, tried to figure out why Jones was not available. Riley decided to send Jones a judicial summons to appear in court 30 days later. For reasons that remain unclear, a clerk instead issued a warrant for Jones' arrest.

A little over two months after the warrant was issued, Jones -- still in jail -- pleaded guilty to armed robbery before yet another judge, Truman A. Morrison, and on April 17, 1984, Jones began serving a sentence of two to 15 years at Lorton Reformatory's maximum-security unit.

Riley's bench warrant, however, remained open in the police files -- that is, until Sept. 4, when police picked up Brown.

Brown, according to court transcripts, vehemently objected to being jailed when he appeared in court, first in front of Judge John D. Fauntleroy and then Judge George H. Revercomb.

But various prosecutors from the U.S. attorney's office insisted that they had checked with police, and that police had compared and matched Brown's fingerprints with those of the original defendant in the case.

However, police Inspector James R. Lee, head of the department's records and identification division, said he could find no evidence that such a comparison was done. "If we had done what they prosecutors said we did, we would have solved the problem," Lee said. Prosecutors would not comment.

Brown remained in custody. "I was surrounded by people charged with rape and murder, and some of them were trying to pick fights with me," he said, also complaining that the jail was crowded and infested with lice.

Brown's attorney, Steven A. Spiegelman, said, "The government insisted they had the right guy. The government convinced the court to hold the guy, is what happened."

Spiegelman said he was stymied in helping his client because prosecutors dragged their feet for weeks before granting the required written permission for a defense inspection of the fingerprints at police headquarters.

Judge Revercomb ordered Brown released Oct. 17 after Spiegelman and a fingerprint expert compared prints of the two men and concluded that the prints were not even similar.

And, the next day prosecutors dismissed the windshield case against Jones