A woman charged with stabbing a mother of five to death in a Maine supermarket went to the store to kill “several random people,” according to a court affidavit released Thursday that says the suspect confessed to the killing.

Connor MacCalister followed Wendy Boudreau from the parking lot of the Shaw’s supermarket in Saco into the ice cream aisle, grabbed the 59-year-old woman from behind and slit her throat, the suspect told police. Boudreau died in a hospital.

The suspect told police she was “angry with his life and wanted to get back at someone.” She also said she was planning the random attack for a month. MacCalister, who was wearing camouflage and had a shaved head, was targeting small elderly woman "whom she knew wouldn't resist," the document said.

The 31-year-old is being held at a York County Jail and is expected to make a court appearance on Friday at the superior court in Alfred. The suspect's lawyer said Thursday that he couldn't comment at this time.

Police have identified MacCalister as a woman. But the suspect's brother told the Portland Press Herald that MacCalister is transitioning to a man.

A Shaw’s employee working the bakery department said she heard screaming and saw MacCalister standing over Boudreau who was sitting on the floor, slumped over, the affidavit says.

When the witness asked MacCalister the reason for the attack, the suspect responded, "She looked at me funny." Another witness told police that MacCalister told him: "I'm off my meds and I didn't mean to do it."

Police say Boudreau had stab wounds to her face and neck.

MacCalister lives in an apartment complex near Boudreau’s home in Saco. However, there is no indication the two knew each other.

The Boudreaus were described by neighbors as beloved members of the community who had been living in the neighborhood for decades. The family’s grandchildren would often visit and play with other children in the neighborhood in large groups, said Jason DiDonato, a neighbor and friend.

DiDonato said one of the Boudreau's grandchildren was playing with one of his children the morning of the killing. He described Wendy Boudreau as "the glue of the family" and her husband as a "great guy" and family man.

DiDonato said he attempted to go to the supermarket to buy some things on Wednesday and saw that it was shut down. He learned of the killing shortly after. He said he remembered seeing MacCalister at the store previously.

"It's one of those things. You don't think when you're shopping that that's the kind of thing that could happen," he said.

Neighbors spent Thursday afternoon stopping by the Boudreau house to offer condolences, but no one was home. Residents of the apartment complex where McCalister lived, which was just a block from the Boudreau home, said the suspect usually wore army fatigues and black combat boots.

Rebecca Brancely, who lives in the apartment next door, said MacCalister always acted friendly. Another neighbor, Marilyn Smythe, said MacCalister rarely left the apartment but was often seen smoking outside.

At the supermarket, which reopened to shoppers Thursday, well-wishers placed flowers and sea shells near the entrance in memory of Boudreau.

The Associated Press contributed to this report.