Jason Quinones was sentenced today to 20 years after raping a woman in her Upper East Side home last summer.Photo: Steven Hirsch

A twisted serial sex fiend was sent to prison for 20 years today for a home-invasion attack that should send women rushing to lock their windows: the rape of a sleeping 27-year-old in her own Upper East Side bed last summer.

The victim — who’d left the window to her ground floor, E. 90th St. apartment open — woke up at 4:30 in the morning to Jason Quinones, 23, raping her, before running naked and screaming into her hallway to summon neighbors.

“I saw the girl was sleeping and I climbed in through the window and had sex with the girl while she was sleeping,” Quinones, a drug-dealing parolee with a three-year-old son, admitted in court today.

Quinones had dashed back out the window when the woman woke, leaving his print on the guard lock. He was quickly matched to that Aug. 2011 attack and a second, push-in sex assault from the month before on E. 83rd St.

DNA would eventually clinch both cases against him, and Quinones pleaded guilty to the rape and the push-in attack last May, sparing the victims from having to face him at trial in return for the promise of a 20 year sentence — a five-year break from the maximum rape sentence allowed by law. Quinones was previously sentenced to seven years for the push-in attack, but will serve it concurrently with today’s 20-year sentence.

Quinones had backed out of his admission of guilt last month, gallingly lying to officials that both women had engaged in drunken consensual sex with him.

Today, Manhattan Supreme Court Justice Richard Carruthers told Quinones that the lie could have voided the whole deal and sent the case to trial. But the judge went through with the original 20-year prison deal anyway, explaining today that Quinones has apologized for the lie and is sparing the victims from trial.

The victims were satisfied with the original 20-year deal, assistant district attorney Samuel David told the judge. Quinones will serve 10 years probation upon his release.

“The defendant sexually assaulted two victims in their own homes, violating their sense of security in the place where they should feel most safe,” said DA Cyrus Vance, Jr., commending both victims for their bravery in coming forward.