DURHAM, N.C. (AP/WNCN) – Craig Hicks, charged with killing three much-admired Muslim university students in Chapel Hill, pleaded guilty Wednesday, more than four years after the slayings, which the victims’ families blamed on bigotry.

Craig Hicks was in court in Durham on Wednesday morning.

Hicks pleaded guilty to three counts of murder and one count of discharging a firearm into an occupied building. He killed his three Muslim neighbors in February 2015. Family members have said it was a hate crime due to their faith.

Hicks said he wanted to plead guilty from the start, but that he was advised by an attorney not to do so. Judge Orlando Hudson told Hicks it is not a lawyer’s decision. He reminded Hicks that the plea comes after the state recently opted not to seek the death penalty.

A judge heard evidence about what prompted the shootings. Police said Hicks claimed the confrontation stemmed from competition for parking spaces at the condominium complex where they all lived.

The families of 23-year-old University of North Carolina dental student Deah Barakat; his 21-year-old wife Yusor Abu-Salha, and her 19-year-old sister Razan Abu-Salha said they believe Hicks acted with anti-Muslim hatred.

In a recently unsealed affidavit, psychology professor Dr. Samuel R. Sommers offers testimony regarding any biases possibly held by Craig Hicks. Hicks told police that the victims were disrespectful to him before the shooting.

The affidavit reveals that the murders were captured on video, information that had previously not been released.

“The cell phone video of the shootings shows no evidence of disrespect,” the document read. It was revealed in court Wednesday that the murders were recorded on Barakat’s phone when he asnwered the door with his finger on the record button.

The video shows Hicks yell at Barakat and then shoot him multiple times. As Barakat falls to the ground, the phone continues to record audio of Hicks shoot Barakat’s wife, Yusor Mohammad Abu-Salha, and her sister, Razan Mohammad Abu-Salha.

Courtroom recording devices were turned off during the playing of the video. Family and friends of the victims in the gallery were in tears, with many muttering things to themselves, according to CBS 17 reporters in court. One said, “You [expletive] scumbag, you piece of [expletive]” at Hicks. The court then went into recess for a few minutes.

Since their deaths, the Our Three Winners Foundation was established by family members of the victims.

It aims to end hate crimes “through a preventive, rather than reactive approach.”

Also in the wake of their deaths, Deah’s brother Farris Barakat opened a youth group home in downtown Raleigh called “The Light House Project.”

The Light House Project looks to end Islamaphobia and promote understanding.

The victims were planning to visit Turkey later in 2015 to volunteer in a dental clinic at a camp for Syrian war refugees.

Hicks is being prosecuted by the Durham County District Attorney’s Office as the killings took place in a part of Chapel Hill that is in Durham County.