The man accused of killing three teens and injuring a fourth at a party in Mukilteo in July pleaded guilty Monday to three counts of aggravated first-degree murder and two counts of attempted murder.

Allen Ivanov’s plea comes one day before the deadline for prosecutor Mark Roe to pursue the death penalty.

Jake Long, Jordan Ebner, and Anna Bui, all 19, were shot to death when Ivanov opened fire on the crowd with an assault rifle.

The guilty plea means Ivanov, 20, will face a mandatory sentence of life in prison without parole. It takes the death penalty off the table.

Ivanov had a mental evaluation Friday, and it was determined he was of sound mental capacity and knew right from wrong. Tim Leary, one of Ivanov's attorneys, said defense attorneys met with Ivanov Friday to discuss a plea. Ivanov’s attorneys offered life without parole if Roe wouldn’t pursue the death penalty.

"He is remorseful for what he did, and I think he is coming to grips with the magnitude of his actions," Leary said of Ivanov. "And he hopes by pleading guilty there is some measure of closure this provides."

Leary said Monday's plea hearing was quite emotional, with many of the victims' families shedding tears as it happened.

“I thought about it all weekend, and this morning told his attorneys that I accepted their offer if he did it TODAY,” Roe wrote in an email.

Roe wrote he had not made up his mind about pursuing the death penalty when the defense called, and the plea was a new factor to consider. The prosecution never made an offer to Ivanov.

Not all of the families of the victims are pleased with the plea because some of them wanted the death penalty, Roe wrote. However, others were relieved, because they wanted a life sentence without a trial or appeals.

“It was a difficult decision, but I believe the right one considering everything,” Roe wrote.

Autumn Snider, Long's mother, was one of the parents who felt the guilty plea did not give justice to the victims. She gave KING 5 permission to share her thoughts, which she expressed in the following post on Facebook:

"I'm not thankful. Justice was not delivered for our children. As much as I love and feel sorrow for the kids who endured this horrific experience, whether I knew them or not, the kids who died are not vindicated. We lost our babies! Our babies are never, ever coming home. Not from college for Christmas. Not ten years from now with their wives and kids. They will not be there when we are old and frail for us to say goodbye following the natural order of life. Nothing. Our kids will never come home. I will never see Jake Long graduate from college. He will never call or text me again. The importance of his life was pushed aside today. I love and respect all of you, your kids, and your beliefs, but I will say my piece. I wish nothing but healing and love for the kids and families affected by this shooting. I cannot imagine the horror of being there. But it's not enough for me, Jake's mom."
Documents showed Ivanov told investigators he was upset about his breakup with Bui and texted friends his intent to kill his "dream girl." About a week before the shooting, Ivanov texted his friend a screenshot, like he was shopping for a gun. The day of the party, Ivanov texted, “I’m killing everyone at a huge party.”

Ivanov also shot 18-year-old Will Kramer, who was injured but survived. Will's father, Paul Kramer spoke to KING 5 about his feelings upon learning of Ivanov's guilty plea.

"There was some surprise, but a great sense of relief," said Paul Kramer. "There were sixteen young adults in that house that survived, and I think this saves them from having to re-live it over and over in a lengthy trial that could go on for probably a really long time."

Still, Kramer said he understands and respects why some of the victims' families were not pleased with the outcome that comes as a result of Ivanov's guilty plea.

"These are families that lost their children. It is a huge, huge loss," he said. "Some think that the perpetrator of the crime should pay with his life, and I want to acknowledge that their voice and their opinion are valid as well. I feel for them. My heart goes out to them.

In Ivanov’s plea statement, he wrote that he went to the party with the intent to kill Bui, but also shot at several other individuals, regardless of the target.

“I did not know who they were at the time,” Ivanov wrote. “I fired the rifle with the purpose to kill whomever I hit.”

Read Ivanov's complete plea statement:

After Ivanov’s arrest, detectives found a written confession.

"I'm selfish that's why I did this,” Ivanov wrote.

Ivanov's sentencing is set for Thursday, Jan. 12, at 9 a.m., when he will be formally sentenced to life in prison without the possibility of parole.