Taylor Swift's serial stalker, who broke into the singer's New York City apartment and ransacked it last month, has been jailed for two to four years after accepting a plea deal with prosecutors.

Roger Alvarado, 23, pleaded guilty to violating his probation - which stemmed from a previous break-in at Swift's home - and has now been sentenced at Manhattan Supreme Court.

Manhattan Supreme Court Justice Laura Ward warned Alvarado that he was to have 'absolutely, positively no contact with Taylor Swift. No phone calls, no letters, no video contact.'

She added, 'Hopefully. no judge will ever see you again.'

Alvarado was arrested on March 7 after using a ladder to climb onto the terrace of Swift's Tribeca townhouse and smashing through a glass door with a concrete block.

Taylor Swift's serial stalker was sentenced Monday to up to four years in jail the clink for breaking into the singer's Tribeca townhouse

The March 7 incident marked the third time 22-year-old Alvarado had invaded Swift's home

Alvarado accepted a plea deal under which he will serve between two and four years in prison

Alvarado was jail just one month after he was released for prison for the ecact same crime

He was charged with stalking, burglary and felony criminal contempt for violating an order of protection.

Last month's break-in marked the third time Alvarado had forced entry into Swift's home, having been released from jail for an earlier invasion just 30 days earlier.

The creepy fan was supposed to be in Florida on probation but instead flew to New York on March 7 then took a taxi directly to Swift’s townhouse in violation of an order of protection.

Alvarado was caught on surveillance footage propping up a ladder he stole from a construction site against the side of the star’s building and managed to climb onto her patio.

He then smashed a glass door with a paver causing more than $4,000 in damage, court papers say.

Swift wasn't home but her security team saw the break-in on her cameras and called 911. Minutes later, police were on the scene and took Alvarado away in handcuffs.

Alvarado used a ladder to climb onto the terrace of Swift's Tribeca townhouse (above) and smashed through a glass door with a concrete block before ransacking the home

Alvarado was arrested in April 2018 for breaking into the 29-year-old's apartment, using her shower and napping on her bed.

In that case he pleaded guilty to criminal contempt and burglary and was sentenced to six months in jail and five year's probation in Florida and ordered to complete mental health treatment.

In a jail interview after his latest arrest, Alvarado told Page Six through 'crazed eyes' that it likely wouldn't be the last.

When asked if he'd do it again, he said: 'Probably, with more violence, but not towards her.

'I don't want to hurt her. I just wanted to speak to her, to talk to her. She seems nice [and] cool.'

At Monday's hearing, Justice Laura Ward warned Alvarado that his restraining order in favor of Swift still applies while he is incarcerated.

Alvarado entered his guilty plea in Manhattan Supreme Court on Monday April 1. The defendant was escorted into the courtroom in handcuffs

Justice Laura Ward warned Alvarado not to try to contact Swift from jail because her restraining order against him still applies while he is incarcerated

Alvarado claims he isn't a superfan of Swift adding 'I listen to a lot of hip-hop'

'Don't think that because you're in jail, you can reach out to (Swift)' Ward said.

Alvarado, of Homestead, Florida, has yet to reveal the motive behind his alleged obsession with Swift.

'I'm not a superfan. I listen to a lot of hip-hop,' the 22-year-old told Page Six last month, adding that his favorite albums of hers are 1989 and Reputation.

When asked why he doesn't try to meet Swift at a concert or without breaking into her home he said: 'Oh, I didn't think of that. I guess I should have done that first.'

Alvarado allegedly beamed at the mention of an interview in which the singer spoke out about having a stalker.

'Does she say my name?' he asked when told of the star's acknowledgement.

The most recent home invasion came just after she revealed that she was so shaken by the deadly suicide bomb attack at Ariana Grande's Manchester concert, that she increased her security at shows and carried gun-wound bandages with her wherever she went.

Representatives for Swift (above at the iHeartRadio Music Awards on March 14) have not returned requests for comment from DailyMail.com

Swift is also no stranger to stalkers, which has prompted her to up her security measures.

In September 2018, she was granted a restraining order on a stalker, 26-year-old Eric Swarbrick who had been sending the star letters since 2016.

In one he declared: 'I want to rape Taylor Swift. This is why I hate Taylor herself... This is how I know I am Taylor's soulmate.'

He said: 'I will not hesitate to kill her... and there's nothing you, your lawyers, or the law will be about to do about it. Remember who I am.'

In April 2018, Julius Alexander Sandrock, was arrested for felony stalking for trying to break into her home, wearing a mask and rubber gloves and with a knife, live ammunition, and black rope.

The 38-year-old told police he had driven across several states to meet the star, who was not home at the time of the incident.