The 18-year prison sentence for the Esplanade rapist — who preyed on women at knifepoint for years — is being slammed by prosecutors who sought to lock him up for decades longer.

“These attacks were separate and distinct from the one for which the defendant is already serving time for, and we believe consecutive sentences would have been more appropriate,” Suffolk District Attorney Daniel F. Conley told the Herald. “These are some of the very worst crimes we see as prosecutors, and they warrant a very serious penalty.”

Suffolk Superior Court Judge Janet Sanders yesterday sentenced Alejandro Done to 18 to 22 years behind bars for three rapes, crimes he committed between 2006 and 2010 that the judge called “despicable.”

But Conley said his prosecutors David Deakin and Amy Martin sought much more — 25 to 30 years starting after the seven to nine years remaining on the sentence he’s currently serving for another rape in Cambridge when he was an Uber driver.

Instead, his sentence begins effective yesterday, to be served at the same time as the remainder of his sentence for the fourth rape.

After the hearing, Deakin said, “We made a recommendation that we believed was a just sentence.”

Lawyer and advocate Wendy Murphy said Done received a “volume discount.”

“Not only is he getting a discount for having abused more people, he’s learning the value of a woman’s body, of a woman’s safety is less than we give some people who steal,” Murphy said.

Done, 49, who sat passively next to his attorney during yesterday’s hearing, pleaded guilty last month to raping three women — one in 2006, another in 2007 and the third in 2010.

He struck at the Esplanade along the Charles River and at Joe Moakley Park in South Boston, and on two occasions kidnapped the women and held them at knifepoint as he raped them. He also is suspected of raping another woman along the Esplanade, but that prosecution didn’t move forward because the accuser moved out of the country.

The spectre of what the media and authorities came to call the Esplanade rapist loomed over the city every summer for years. The police department issued warnings as summer began to approach that women needed to be extra alert — he was still out there.

Police figured out his identity after Done was captured in late 2014 for assaulting a women after she got into his Uber car. A judge sentenced him to a 10- to 12-year sentence in 2015 for that crime.

Two of his three victims gave statements in court yesterday, asking for a lengthy punishment for the man who forcibly raped them. Both said they continue to struggle with the horror of what Done did to them.

“I spent 20 years of my life feeling secure and confident and 10 years crying when I’m alone,” said the woman Done raped at knifepoint in 2007. “That night will follow me around for the rest of my life. … He may look you in the eye and say how sorry he is today, but I can promise you he is only sorry he got caught.”

“I pay the price for this crime every day of my life, and so should he,” said the woman Done raped in 2006. “He is not safe on these streets. He will do this again.”