Taylor Swift's alleged stalker was deemed too mentally unfit to stand for trial.

Mohammed Jaffar - who was arrested on March 6 for stalking and burglary after having allegedly followed the 'Bad Blood' hitmaker for months - appeared at Manhattan Supreme Court briefly on Monday (09.25.17), before being ordered by doctors to be sent to a psychiatric facility, TMZ reports.

Prosecutors complied with the request and Justice Laura Ward had him taken away to seek treatment until he's well enough to return to court.

In June, it was revealed that the obsessed fan spent four hours loitering on the singer's building's roof.

Jaffar attended an arraignment hearing, and the court was told his obsessive behavior escalated in February, when he was seen going to Taylor's apartment building in Tribeca, New York.

At the time, prosecutor Caitlyn Jaile told Justice Laura Ward: ''The defendant was observed via video surveillance inside [Swift's] apartment building attempting to enter the actual apartment ... spending approximately four hours outside of the apartment and on the roof deck.''

According to documents obtained by the New York Daily News newspaper, Jaffar had called the 'Shake It Off' hitmaker's management team almost 60 times in just two weeks in January in a bid to get in touch with her.

He then made his trip to her building on February 6, and returned on February 13, where he rang the 26-year-old pop star's doorbell continuously for an hour until he was asked to leave. He returned again the next day, where he again rang the bell, but was ordered to move after 45 minutes.

And the court papers alleged he was outside the property again on February 15.

When asked to enter a plea, Jaffar said: ''Obviously not guilty.''

His brother, Ali Jaffar, accompanied him to court and revealed his sibling suffers from bipolar disorder but was managing his condition better.

He said: ''He's taking his medication right now. He's getting better. The [prosecutors] should go easier on him.''