Boston Police Commissioner Edward F. Davis said yesterday that he did nothing wrong when, as a Lowell detective in the 1980s, he led an investigation of a rape and assault that led to a man's wrongful conviction and 19-year imprisonment.

Dennis Maher, the exonerated man, settled a civil rights lawsuit this month against Davis, the Lowell Police Department, another Lowell police officer, and the City of Lowell for $160,000, far below the $20 million he had sought. A federal judge must approve the settlement.

In an interview, Davis said he did his job as a detective, following the evidence in the 1983 case in which one woman was raped and another was attacked with a knife, before DNA testing was prevalent. Maher was freed in 2003, after DNA evidence exonerated him.

"We were working in a system that I participated in, and he was arrested and convicted by a jury," Davis said. "It's clear that he did not rape the person that he was convicted for. Sure, it's a regret that someone innocent of rape went to jail. I'm really glad that DNA was able to work that issue and prove that he wasn't responsible for it. But no system is perfect."

Asked whether he thought he should apologize to Maher or his family, Davis said, "No, because I didn't do anything wrong. I worked with some victims who were convinced that this was a man who did this."

Maher, 48, a mechanic living in Tewksbury, declined to comment on Davis's statements or the outcome of the lawsuit, because he still has a $20 million lawsuit pending against the Town of Ayer. He sued that town and an officer there after Ayer police charged him in the August 1983 rape of another woman following his arrests in Lowell. He was convicted on the assault in 1984 but freed in 2003 after DNA testing showed he was not the assailant.

Asked how he is doing otherwise, Maher, now a father of two, said, "Life is good."

His lawyers declined to comment.

Lawyers for the Town of Ayer could not be reached for comment yesterday. They have filed a motion in federal court asking a judge to reject the agreement between Maher and the other parties or issue a judgment in proportion to that financial settlement.

Maher's ordeal began in November 1983. A woman was walking home one evening when a man approached her, dragged her to a nearby yard, and raped her. The following day, another woman was walking in the same area when a man approached her, cut her with a knife, and tried to rape her. She kneed him in the groin and escaped, according to court records.

At the time, Maher was an Army sergeant assigned to Fort Devens with no prior criminal record. A few hours after the second assault, he was walking in the area where the attacker had struck and wearing a red-hooded sweatshirt, similar to the one the suspect had been wearing.

Davis, who according to records had been in the area with a composite sketch of the rapist, stopped him. Maher was charged after the two women identified him from a photo array.

In his lawsuit, Maher accused Davis and Officer Garrett Sheehan of a series of abuses, including falsifying a police report and trying to undermine Maher's alibi. The lawsuit also alleged that after one of the victims identified another man as her attacker, Davis and Sheehan placed a chair in front of Maher during a lineup to goad the second victim into identifying him.

All those allegations were proved to be false, said Davis's lawyer, Philip S. Nyman who is based in Lowell. "The allegations made by Mr. Maher and his counsel are obviously not as strong as they had alleged," he said. "The City of Lowell made a decision to settle the case basically for the cost of the trial."

J.W. Carney Jr., who was the prosecutor in the case and is now a defense lawyer, has apologized to Maher for the outcome, but Davis remained adamant that the investigation was handled appropriately.

"I feel terrible that this system did not work right for him," he said. "But in the whole lawsuit that was filed, there were allegations made in there that weren't true."