ALFRED — A judge described the random murder of 59-year-old Wendy Boudreau at a Saco supermarket as “absolutely devastating” on Monday and sentenced the woman who killed her in a knife attack in August to serve life in prison.

Connor MacCalister, 31, of Saco was sentenced by Justice John O’Neil Jr. in York County Superior Court in Alfred after Boudreau’s family stood up, one after another, to remember a devoted wife, mother and grandmother who put her loved ones before herself.

“Perhaps the ultimate tragedy of this case is that the victim who was selected at random and was described as a kind, caring, loving individual is the opposite of someone who would have caused Ms. MacCalister pain,” O’Neil said.

MacCalister, who was born female but sometimes identifies as a transgender male, waived all mental health defenses and pleaded guilty last month to Boudreau’s murder. MacCalister asked to be sentenced to life and rejected arguing for a lesser sentence. Murder in Maine is punishable by a minimum of 25 years to life in prison.

MacCalister’s attorney, Robert LeBrasseur, said his client pleaded guilty against his advice out of a desire to take full responsibility for killing Boudreau, and that he had no choice but to argue for the life sentence MacCalister requested.

MacCalister randomly targeted Boudreau on Aug. 19 at Shaw’s supermarket, attacking Boudreau from behind with a knife without provocation in the store’s freezer section.

MacCalister told witnesses immediately after the stabbing that she had stopped taking prescribed medication. But a transcript of MacCalister’s interview with a police detective after being arrested indicates she had never stopped taking the medications.

LeBrasseur has said that while in jail, MacCalister, who was born Tanisha Hopkins, had stopped taking testosterone treatments that had been part of her transition from female to male. Since then, MacCalister had returned to self-identifying as a woman, then recently began identifying as a man again, he said.

Assistant Attorney General Leane Zainea, who prosecuted the case against MacCalister, said that MacCalister had acted with premeditation when she went to Shaw’s intending to kill one person, take another hostage, kill the hostage when police arrived and then surrender.

“The sole reason that the defendant killed was to make others feel pain as she felt she had,” Zainea said. “It is an incomprehensible motive to kill.”

Boudreau’s younger sister, Patricia Parisien, described Boudreau as a “mother hen” who first watched out for her as a child and then for her family.

“The sense of safety and security in the Greater Saco area has been shattered,” Parisien said. “If this could happen to Wendy, it could happen to anyone.”

Boudreau’s eldest grandchild, Paige Boudreau, spoke while surrounded by a group of fellow grandchildren.

“I love my grammy very much and miss her more than anything else in the world,” said Paige, a high school student.

One of Boudreau’s four children, Jessie Boudreau, read letters to the court from her father, Jeffrey, and her siblings describing how MacCalister’s actions have devastated the family.

“Her actions cracked the foundation of our family and the Greater Saco community,” Jessie Boudreau said.

She read a letter from her sister, Jennifer Boudreau, describing how she arrived at the Shaw’s supermarket shortly after the stabbing without realizing her mother was the victim until she saw her mother’s purse in an aisle where blood remained pooled on the floor.

“I replay that day over and over again in my mind, remembering the last conversation I had with her, wishing I had said I love you one more time,” Jennifer Boudreau said in the letter read by her sister.

After Boudreau’s family members had stood before the court, MacCalister turned around to apologize to them.

“My heart goes out to you,” MacCalister said. “I’m sorry.”

Throughout much of the court proceeding, MacCalister watched a video slideshow projected on a screen that showed pictures of Boudreau with her family. MacCalister’s back was to the spectator section of the courtroom, making it difficult to gauge her reaction.

MacCalister has been held without bail in the women’s section of the county jail and will continue to be held in jail until the Maine Department of Corrections takes custody. After that, it will be up to the DOC to determine where MacCalister will be incarcerated.

MacCalister had previously been hospitalized at Riverview Psychiatric Center in Augusta and Spring Harbor Hospital in Westbrook, both psychiatric facilities. MacCalister had been previously diagnosed with post-traumatic stress disorder, an anxiety disorder, attention-deficit hyperactivity disorder and depression, according to a mental evaluation report filed with the court by Debra Baeder, chief forensic psychologist for the State Forensic Service.

“Her insight was limited and she also was significantly fatalistic about all aspects of her future. Her impaired insight/fatalism appeared borne of some form of mental illness, most likely of the depressive quality. That fatalism, however, did not exceed the bounds of rationality,” Baeder wrote.

In pleading guilty on Oct. 8, MacCalister did so at the earliest legal opportunity after being indicted Sept. 10 by a grand jury on the murder charge. The October hearing was MacCalister’s first time back in court since Aug. 21, when O’Neil ordered her held without bail.

Maine State Police Detective Kristopher Kennedy said in a written affidavit filed with the court in August that MacCalister confessed to police in the hours immediately after the murder that she was “angry with life” and “wanted to get back at someone.”

Kennedy wrote that MacCalister went to the supermarket with plans to kill several people and wanted to target an elderly woman who wouldn’t resist. Police have said MacCalister and Boudreau didn’t know each other.

MacCalister saw Boudreau in the parking lot and followed her into the store, police said. MacCalister grabbed Boudreau from behind in the ice cream aisle and stabbed her, Kennedy wrote. One of Boudreau’s daughters and a grandchild were shopping in the store with Boudreau, but didn’t see the attack.

MacCalister lived just one street away from the home on Bonython Avenue in Saco where Boudreau lived with her husband for more than 30 years.