A Northeast Washington man convicted last year of raping a 12-year-old girl was released from jail yesterday and given a new trial after a judge ruled that prosecutors improperly influenced the jury at the man's trial when they introduced his previous criminal record.

Ondrae Lamont Gant, who was facing a maximum sentence of life imprisonment, was being held without bond at the D.C. Jail while awaiting sentencing. D.C. Superior Court Judge George H. Revercomb yesterday ordered Gant released on his personal recognizance and directed him to enroll in a drug rehabilitation program pending a new trial. No date has been set for the new trial.

A jury last October convicted the 26-year-old Gant of rape, carnal knowledge and enticing a minor child for the purpose of taking indecent liberties after a girl testified that Gant forced her into his car and raped her as she was walking home from school.

Gant admitted at his trial having sex with the girl. But he denied raping her, telling jurors that she had consented.

After the conviction, Gant's public defender, James McComas, asked for a new trial, arguing that the prosecutor prejudiced the jury by eliciting testimony from Gant during cross examination that Gant had previously been convicted of robbery.

In his ruling yesterday, Revercomb agreed with the defense motion, writing that the prosecutor's use of the robbery conviction implied to the jury that "if he [Gant] had sex with the complainant, [he] was likely to have accomplished it by force."

The D.C. Court of Appeals has ruled in previous cases that prosecutors can use a defendant's prior criminal record in trial to impeach his credibility, but that they cannot present that information in a way that implies he is likely to have committed the crime he is being tried for.

In papers filed opposing Gant's motion for a new trial, prospectors argued that the Court of Appeals decision applies to cases where the defendant's previous conviction was for the same type of crime as the new charge. The jury hearing Gant's rape case, they argued, could not be prejudiced by hearing evidence of a prior conviction for robbery.

Revercomb disagreed, writing that it was "unlikely that the jury was able to restrict the use of this evidence to its proper purpose" and that the error "was of such magnitude that it could not be cured by a cautionary instruction."

Some veteran lawyers yesterday called Revercomb's ruling unprecedented, saying it goes far beyond previous courg decisions on what prosecutors can tell a jury about a defendant's criminal record.

McComas called the decision "absolutely right," adding that "it doesn't get [the defendant] off the hook. It just gets him what he always wanted -- a fair trial."