Former University of Mississippi student Brandon Theesfeld pleaded guilty to first-degree murder Friday in the July 2019 killing of fellow student Alexandria "Ally" Kostial. 

The remains of 21-year-old Kostial, who was working toward a marketing degree at Ole Miss, were found about 30 miles from campus near Sardis Lake with multiple gunshot wounds on July 20, 2019. 

Theesfeld, who was a business student at the school, was arrested two days later at a gas station in Memphis, Tennessee, in possession of a .40-caliber Glock. Prosecutors said in court Friday that ballistics from the scene at Sardis Lake were a match for his gun. 

MINNESOTA MAN CHARGED WITH MURDER AFTER ALLEGEDLY DRIVING INTO PROTESTERS, LEAVING 1 DEAD

Kostial told Theesfeld three months before she was killed that she was likely pregnant, but Theesfeld responded in messages that "he felt becoming a father at this point in his life would ruin his life," a prosecutor said in court Friday, according to a stream of the proceedings recorded by Fox affiliate KTVI

Theesfeld avoided meeting in person with Kostial over the next three months and eventually drove to the Dallas area and got the Glock handgun about a week before the slaying. 

Brandon Theesfeld, left, is led from the Lafayette County Courthouse in Oxford, Miss., Tuesday, July 23, 2019, after being arraigned in connection with the death of 21-year-old University of Mississippi student Alexandria "Ally" Kostial. (Bruce Newman/The Oxford Eagle via AP)

Brandon Theesfeld, left, is led from the Lafayette County Courthouse in Oxford, Miss., Tuesday, July 23, 2019, after being arraigned in connection with the death of 21-year-old University of Mississippi student Alexandria "Ally" Kostial. (Bruce Newman/The Oxford Eagle via AP)

Kostial was last seen on surveillance video leaving a bar shortly before midnight on July 19. 

Around 1 a.m. on July 20, Theesfeld could be seen driving toward Kostial’s home then driving away toward Sardis Lake. Gunshots were heard by someone near the lake around 2:15 a.m. and GPS coordinates on Theesfeld's phone show him leaving the lake about 30 minutes later, the prosecutor said Friday. 

All of the bullets in Kostial's body that were whole enough for forensic testing were confirmed to have been fired from Theesfeld's Glock. 

Authorities performed a search warrant at Theesfeld's residence and found a letter addressed to his parents. 

"I am not a good person. It is not your fault. Something in me just doesn’t work," the letter said, according to the prosecutor. "I’ve always had terrible thoughts I’ve always had these demons. I just kind of fell off. I think this is the end for me. I’m either going to prison or going to die. I know I will be caught." 

Theesfeld will now be sentenced to life in prison. He apologized to Kostial's family and his own family Friday. 

"I wish I could take it all back but I can’t," Theesfeld said. "There is no excuse for my actions. I have asked God for forgiveness and I hope that one day you’ll find it in your heart to forgive me."

CLICK HERE TO GET THE FOX NEWS APP

A letter by Kostial's mother that was read in court Friday described her as bright, compassionate, sweet and hardworking. 

"We take comfort in the fact that Ally will never be defined by how she was ripped out of our lives, but how she lived her life and all her great qualities," the letter said. 

"Our lives have been forever altered and shattered and her absence haunts us every day."