Federal prosecutors agreed Tuesday that a Washington man imprisoned for 20 years for rape is innocent and they acknowledged scientific errors in his case after DNA evidence proved that another man committed the crime.

Kirk L. Odom will become the second District man in two months and the third in three years to have his conviction for rape or murder overturned because of erroneous hair matches claimed in court by FBI forensic experts.

Odom’s case was featured in a series of articles in April in which The Washington Post reported that Justice Department officials have known for years that flawed forensic work might have led to the convictions of potentially innocent people.

Odom, 49, served his sentence and was released from prison in 2003. He was convicted of raping, sodomizing and robbing a 27-year-old woman before dawn in her Capitol Hill apartment in 1981. However, court-ordered DNA testing revealed in January that the hair fragment in his case could not have come from Odom.

Further DNA testing of stains on a pillowcase and robe indicated that only another man, not Odom, could have committed the crime.

“More than 30 years after Mr. Odom’s conviction, DNA testing reveals that he suffered a terrible injustice,” U.S. Attorney Ronald C. Machen Jr. wrote in a two-page filing in D.C. Superior Court.

“The United States expresses its profound regret for the harm suffered by Mr. Odom, and requests that this Court immediately vacate Mr. Odom’s convictions and dismiss the indictments against him with prejudice,” Machen wrote.

Odom, who was identified in court as the attacker by the victim, was thrilled by the news.

“Oh my goodness, the storm is over, yes yes!” he said from the office of his attorney, Sandra K. Levick, chief of special litigation for the District Public Defender Service.

“There’s no more dark clouds, and the sun is beginning to shine very bright,” said Odom, who lives in Southeast Washington with his wife, Harriet, a medical counselor.

Asked if he would say anything to police or prosecutors, or to the victim, Odom responded, “There’s nothing much to say except, ‘God bless you.’ ”

The Post generally does not name victims of sexual assaults without their permission.

The man whose DNA matched the stains is a convicted sex offender. He will not be charged, because the statute of limitations has expired on the crime, Machen said.

In a written statement, Machen endorsed eliminating the statute of limitations on sex crimes.

“Though we can never give him back the years that he lost, we can give Mr. Odom back his unfairly tarnished reputation,” Machen wrote. “Three decades ago, law enforcement got it wrong: Mr. Odom did not commit this crime. . . . It is never too late to secure justice — even if that means correcting a grave injustice from decades earlier.”

Odom would become the 293rd person cleared by post-conviction DNA testing in the United States, after the judge rules on what is now a joint motion between the prosecution and defense.

Odom would be released from lifelong parole and no longer would have to register as a sex offender. He also would be allowed to seek financial compensation for damages sustained during his 20-year incarceration. Prosecutors also said they would agree to seal his arrest and conviction record.

In May, a Superior Court judge dismissed the murder conviction against Santae A. Tribble, 51, after DNA tests disproved testimony at his trial from an FBI hair expert linking him to the 1978 killing of a District taxi driver.

In December 2009, Donald E. Gates was exonerated of a 1981 rape and murder in Rock Creek Park — again after DNA tests ruled out a hair match claimed by the FBI.

“We salute Mr. Odom for having the courage and fortitude to withstand more than 31 years convicted of terrible crimes for which he was absolutely innocent,” Levick said. “We salute the United States Attorney’s Office for joining us today to remedy this tragic injustice. And we salute the Department of Justice and the FBI for agreeing to a review of all cases involving hair evidence of the kind used to convict Mr. Odom, Mr. Tribble and Mr. Gates.”