AUGUSTA, Maine — A teenager who told authorities she "snapped" and killed her parents while struggling with gender identity and acceptance was sentenced Tuesday to 40 years in prison. Andrea Balcer, who was 17 at the time of the fatal stabbings, asked for forgiveness from her remaining family members, many of whom had called for the maximum penalty.

"I do not speak today to beg for lenience or to try to save myself from due punishment. I'm here only to ask for one thing, the forgiveness of my family," she said.

Her attorney argued that the teenager was dealing with her transition from male to female in isolation and without family support at the time of the killings. She had no criminal record before the violence early on Oct. 31, 2016, in the family's Winthrop home. CBS affiliate WGME-TV reports Balcer also killed the family's pet chihuahua because it kept barking.

Get Breaking News Delivered to Your Inbox

Andrea's older brother, Christopher Balcer, who she spared, said his sister's excuses were "flimsy" and urged the judge to be firm. "In my view, all leniency does is put a remorseless murderer back on the street," he said.

Antonio "Tony" Balcer and wife Alice Balcer Family Handout via WGME-TV

Family and friends disputed the notion that the parents, Alice and Antonio "Tony" Balcer, were anything less than loving and supportive to Andrea and Christopher.

Balcer, now 20, looked down, wiped away tears and took notes while friends and family testified about the pain caused by the deaths. They said the couple, who were both 47 when they died, was widely regarded as caring people.

Carl Pierce, Alice's brother, said the suggestion that gender identity, abuse or lack of family support played a role was an "insult to our family, an insult to our society and an insult to the LGBTQ community."

Pierce said he'd talked openly to the father about his daughter's sexuality.

"There was no hatred. There was no malice. There was no ill will. There was resignation to be sure but ultimately there was acceptance," he said.

"To justify these killings because of sexual identity or gender disphoria beliefs is truly a cowardly act. Andrea should be ashamed of herself for it," Pierce added.

Tony Balcer's mother also spoke in court, according to WGME-TV.

"The time I would have had with him has been stolen from me and my family. And our lives will never be the same," Christine Doval said holding back tears.

The killings were gruesome.

On a 911 recording, Andrea Balcer told the dispatcher she stabbed her mother in the back before stabbing her father when he awoke to his wife's screams. She told detectives she stabbed her mother while she was hugging her. A military-style knife was found stuck in the floor near her father's body.

Balcer allowed her brother to escape, telling him, "It's not your day," the brother said.

Balcer was unable to explain her actions at first, telling a dispatcher she "snapped" and telling detectives she didn't understand her actions.

She later said that from an early age she felt that she was a woman trapped in a man's body, and that her parents weren't supportive when she told them of her transition. She also claimed she had been abused by her mother.

Despite her age, Balcer was treated as an adult in court proceedings, and she pleaded guilty under an agreement that capped her sentence at 55 years. She turned 20 the week of her sentencing.

Justice Daniel Billings found mitigating factors including Balcer's lack of criminal record, her good grades, her age and her acceptance of responsibility by pleading guilty.

But the judge declined to take into account her struggles with gender identity in imposing the sentence. The judge said other transgender people struggle with societal and family acceptance, and that it shouldn't be used as an excuse for her actions.