A Massachusetts rape victim kept following up with Easton Police Detective William Fulcher on her case, 15 years after allegedly being attacked.

The detective encouraged the victim, prosecutors recalled in Taunton District Court on Wednesday morning. Someday, there could be an arrest.

When Fulcher was about to retire in June 2011, he called troopers handling unsolved cases and worked to ensure a rape kit in the case was sent out for further testing.

That victim and three others may be closer to justice now. Prosecutors say Ivan Keith, a 61-year-old who used to live in Bridgewater and fled Massachusetts about 16 years ago, has been linked to all four rapes by DNA from a vaping pipe found when Keith was arrested earlier this month in Maine.

After testing the DNA, the chance that someone else committed the rapes is 1 in 3.289 quintillion, which is 18 zeros after the three, prosecutor William McCauley said during Keith’s arraignment.

When Keith was arrested, he told police, “I get it, my time is up,” according to McCauley, who added that Keith also told authorities he thought about running out the back door and believed he could avoid the police “longer than Whitey Bulger.”

Bulger was the notorious Boston mob boss who evaded authorities for 16 years and was convicted of 11 murders and sentenced to life in prison in 2013 before being killed in federal prison last year.

Keith was arrested on Aug. 2 in Seal Cove, Maine, where he was living under other names, including Christopher Keith, officials said. He is charged with five counts of aggravated rape; two counts of kidnapping; two counts of assault and battery with a dangerous weapon; two counts of threats to commit bodily harm; assault with a dangerous weapon; breaking and entering into a building in the night with intent to commit a felony; failure to register as a sex offender; making false statements; and perjury.

A judge has ordered Keith, a Level 3 sex offender, held without bail pending a dangerousness hearing on Aug. 21. Not-guilty pleas were entered on his behalf.

Aside from saying his client denies the charges, defense attorney Jason Maloney declined to comment.

Prosecutors in court laid out the long and detailed process that led to the new charges.

Investigators assigned to the office of Bristol District Attorney Thomas Quinn’s office began re-investigating the cases earlier this year.

On July 27, 1997, outside Bristol-Plymouth Regional High School in Taunton. A 36-year-old woman was walking on the track outside the school when a man wearing a mask and gloves “popped” out of a wooded area in front of her, McCauley said in court.

The man threatened her, bound her with her shoelaces and then raped her repeatedly, McCauley said. A glove fell off during the alleged attack, and the victim was able to describe a ring she saw on the man’s hand, according to the prosecutor.

Then on Nov. 22, 1998, a 47-year-old mother was working late at her job cleaning offices at the Steve Porter Appraisal Services in Easton.

McCauley said the woman was taking out trash when a masked man wearing gloves pushed her back into the building through an office. He tied her up with shoelaces, raped her and threatened her, the prosecutor said.

“Because of the masks and the gloves, there was no ability to identify the perpetrator of these crimes,” McCauley said.

Detectives conferred and discovered there was a similar crime on Nov. 22, 1996, in West Bridgewater.

In that case, a 32-year-old mother had gone to a school for a parent-teacher conference. When walking back to her home on a path, she was accosted by a man wearing a mask and gloves, who pushed her into a wooded area, used a bootlace to tie her up and raped her, McCauley said.

Once rape kits in those three cases were sent for testing and DNA was entered into the database CODIS, there was a hit for a match in a Quincy case.

In that incident, a 60-year-old woman was working late in the Quincy High School administration office on Feb. 15, 1996, when someone went into the building, McCauley said.

A janitor spoke to the man, who said he went to the high school about 20 years prior. Then, the man went into the office, tied the victim up with her scarf and raped her, McCauley said.

The man pulled a gun during the incident, according to court documents.

Investigators later confirmed that Keith did go to Quincy High School.

The four cases were all connected, but without a suspect.

When investigators started to look at the case again earlier this year, they utilized Parabon lab in Virginia to learn more about the suspect for whom they had DNA, but no name.

Investigators tracked genealogy and were able to find a common ancestor to the unknown defendant’s DNA. They identified a now-deceased mother who had four sons, one of whom lived in Bridgewater at the time of the rapes.

It led to Keith.

Investigators looked into Keith and discovered a “significant prior criminal history,” McCauley said.

In 1983, Keith was charged with open and gross lewdness. In 1989, he was charged with the rape of a 13-year-old relative, McCauley said.

There were other charges of open and gross lewdness from Brockton in 1995. In Maine in 1999, Keith was accused of peeping into motel windows. Also in Maine, in 2000, Keith was charged with indecent conduct and received a six-month sentence.

Then in 2003, Keith faced charges in connection with incidents of “flashing” women from Bridgewater State University, McCauley said.

Shortly before going to trial, Keith allegedly told family members he was leaving. He said they would never see them again and said, according to prosecutors, “they want my DNA, I did some bad things, and if they get my DNA I’m going to do 80 years.”

That’s around the time Keith, “fell off the face of the Earth,” McCauley said.

In recent years, authorities in Maine have received complaints about Keith.

The man was working at a friend’s farm stand in August 2013 when a family with two young girls stopped by. Keith offered to show the girls, ages 11 and 13, some of the farm’s rabbits. He allegedly exposed himself to the children, according to court documents. The family, who was visiting Maine from another state, declined to pursue charges.

In January of this year, Keith apparently showed up at a home where a 17-year-old girl was dog sitting.

“The man was asking her to let him in and the teenager was afraid and called her mother who alerted the police,” court documents read.

Police got to the home and spoke with Keith, who identified himself as “Chris Keefe.” No charges were filed, according to court documents.

During the arraignment, Keith shook his head a few times.

Last month, Quinn’s office obtained arrest warrants for failure to register as a sex offender and making false statements. When those warrants were entered into the National Crime Information Center, and with assistance from Massachusetts and Maine authorities, Keith was located living under a new name in Seal Cove, Maine.

Keith was arrested and eventually waived rendition, returning to Massachusetts.

“These women have waited approximately over 20 years for this day, in terms of the identification of the defendant,” McCauley said.