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, 20, who was known as Andrew 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 October 31, 2016, in the family's Winthrop, Maine, home.

Andrea Balcer, left in court on Tuesday, was sentenced to 40 years in prison for stabbing her mother Alice (right with her when she was known as Andrew) and father in 2016

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.

Family and friends disputed the notion that the parents, Alice and Antonio 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, were 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.

Andrea stabbed her mother and father Antonio (pictured) at their home in a gruesome attack she later blamed on them not being supportive of her transition

Andrea also killed the family's pet chihuahua

Andrea wiped away tears in court on Tuesday as she begged for forgiveness

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.

Andrea, pictured as Andrew with her late mother, also killed the family's pet Chihuahua

She also killed the family pet, a Chihuahua, but 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.