David Matterson sentenced in assaults on 4 island women.

BARNSTABLE — A serial rapist who invaded the Nantucket homes of several women over seven years and assaulted them for hours was sentenced Tuesday in Barnstable Superior Court to 20 years in prison.

David Matterson, 37, had pleaded guilty last month to four counts each of home invasion and kidnapping; three counts of aggravated rape in the commission of a felony; two counts of assault and battery with a dangerous weapon; and one count each of breaking and entering in the nighttime to commit a felony and assault to rape.

The first of his four victims, who was raped at knifepoint in her Bartlett Road home in July 2008, told the court that she had waited “a very long time for this day.”

“I always tell myself that what this man did to me will never define me. It’s simply something that happened to me,” the woman said, stopping periodically to fight back tears. “This is no more than a chapter in my book, and today that chapter ends.”

The Times does not generally identify victims of sex crimes.

In each incident, Matterson, a native of Jamaica who before his arrest had lived on Nantucket off and on for about a decade, entered the homes of women he did not know at around 4 a.m. armed with a knife, tied the women up and sexually assaulted them. Each woman awoke to find him on top of her, according to Cape and Islands Assistant District Attorney Tara Miltimore.

The first three incidents resulted in rape charges, but in the fourth attack the woman fought with him and he struck her with a piece of wood, according to Miltimore’s statement of facts, which was read in court last month. The woman’s neighbor, who heard her screams, eventually yelled down to her, which caused Matterson to flee.

Investigators pegged Matterson as a suspect by tracking sexual enhancement pills left at the scene of one attack to an adult toy shop in Hyannis. They then obtained a surveillance video from the shop that showed him making a purchase.

After a seven-year investigation, police linked DNA found at some of the crime scenes to a soup container Matterson threw away at an island restaurant.

He was arrested Oct. 20, 2015, at the job site on Cliff Road where he worked as a carpenter.

Matterson’s first victim told the court that every day for the past nine years she has gotten out of bed and made an effort not to let “this pathetic excuse for a human being” affect her life.

“I strongly believe with every fiber of my being that, if given the opportunity, he will do this again,” she said.

For the rest of the hearing, the woman sat in the courtroom surrounded by family and Nantucket and state police officers. She continuously fidgeted with her fingers as the man next to her draped his arm protectively across the bench behind her.

Another victim submitted a written impact statement but did not speak in court. The other two victims were out of state and could not attend the sentencing.

Judge Gary Nickerson accepted a plea agreement between the prosecution and the defense that included a sentence of 20 years at Massachusetts Correctional Institution-Cedar Junction in Walpole, with credit for time served, followed by 10 years of probation.

While on probation, Matterson will not be allowed to return to the island, must remain on GPS monitoring, not contact the victims or their families and reimburse the victims for any mental health or medical expenses they have paid since the attacks.

Matterson’s attorney, Stephen Hrones, called the sentence “very reasonable for all parties.”

While living on the island, Matterson was a good worker, had many friends and the support of a loving family, Hrones said.

“And then this came about, and it’s very serious,” Hrones said. “It is inexplicable why this all took place.”

Dressed in the same blue sweatshirt and jeans he has worn at every hearing since his arrest, Matterson looked at the courtroom floor throughout his sentencing.

Matterson was not responsive during a previous attempt to evaluate him after he collapsed in court last month. He will be required to undergo a mental health evaluation in prison and take part in counseling if necessary.

— Follow Haven Orecchio-Egresitz on Twitter: @HavenCCT.