A woman accused of throwing her baby out of a four-story bathroom window in Queens told authorities that an evil spirit had taken over the boy, according to court papers Monday. 

The mother, 21-year-old Rashida Chowdhury, is accused of tossing 20-day-old Rizwan Ahmad to his death just before 4 a.m. on Friday.

The infant fell more than 40 feet, hitting the ground with a "thump." After hearing the noise, a neighbor went outside and saw Rizwan lying on the cement of the Richmond Hill building courtyard.

Chowdhury, who was charged with second-degree murder, was held without bail and ordered to undergo a psychiatric evaluation during her arraignment over the weekend.

An attorney for Chowdhury did not immediately respond to a request for comment.

Chowdhury told investigators that Rizwan had been possessed by a spirit and sick recently, and she was "stopping the pain," according to court records.

The impact caused skull fractures, as well as lacerations of the brain, liver and spleen, according to court records.