She said her attacker’s knife was red, although O’Loughlin’s knife had a brown handle. She said the rapist was wearing a sheepskin coat — unlike O’Loughlin when he was arrested. However, she still testified that O’Loughlin was her attacker.

O’Loughlin’s sister Kathy Beevers, then 16, took the stand and said she was with her brother all evening, but it did him no good. O’Loughlin was found guilty and sentenced to four to six years in prison.

His defense attorney, Edward Harrington, now 83 and a semi-retired U.S. District Court judge in Boston, told The Eye he was never more sure of a client’s innocence. O’Loughlin “was identified by a young woman on the basis of his voice,” he said.

After the trial, Harrington wrote letters to the police urging them to investigate other potential suspects. He appealed, claiming police prejudiced the victim’s identification of O’Loughlin by bringing a single suspect to face her rather than setting up a photo array or lineup. The appeal was denied in 1984.

In prison, O’Loughlin said he was attacked repeatedly. One assault broke his nose, and in another, he was pushed down the stairs. He was moved from one prison to another after his life was threatened.

“I never thought I’d get out alive,” he said.

The conviction took a toll on the whole family. His mother Connie, now 78, said she became a recluse – afraid of disapproving looks on the street. She remembers a phone threat to kill her children. O’Loughlin’s sister said she began missing classes to attend trial hearings, was stigmatized at high school, and eventually dropped out.

When her brother was released, he was a changed man. His family said he was distrustful. He couldn’t walk down the street alone for fear of getting arrested.

He moved to New Hampshire, then Texas, trying to escape his past. He fell in love and married, but couldn’t find the words to tell his wife or two daughters about the conviction.

But he felt forced to tell his wife after getting a call from state police in 2004 telling him that he had to register as a sex offender. Although he persuaded the state to waive the requirement in light of his decades of crime-free living, the scare prompted him to finally tell his wife, which he believes put them on a path to divorce.

“The trust was gone,” he said.

Then, in 2012, a Framingham police detective named Kevin Slattery contacted the Middlesex County district attorney’s office and indicated that police may have made a mistake, court records show. He had discovered a man who looked like O’Loughlin and had been found guilty of several sexual offenses before and after the 1982 rape.

The man, who was 17 at the time of the rape, lived about two miles away from the victim’s home, and he matched O’Loughlin’s build and coloring. Two years earlier, he had been arrested after exposing himself to a 5-year-old girl and a middle-aged woman on the same night, and had a knife in his possession when arrested.