A 14-year-old girl has been sentenced to 25 years in prison for stabbing and killing her friend at a sleepover.

Fox News reports the unidentified teenager from Fort Worth, Texas, was sentenced on Friday in the death of 14-year-old Nylah Lightfoot, who was fatally stabbed at an apartment complex in May 2018.

Four girls were at the sleepover at Lightfoot’s when at about 3:30am, the accused left to go to her own home nearby, because there wasn’t enough room for her.

Things became heated and Lightfoot followed the defendant to her home. That’s when the victim and defendant got into an argument outside the defendant’s home.

The suspect went inside, grabbed a kitchen knife, returned and stabbed the victim.

The medical examiner said Lightfoot died from stab wounds to her neck and chest.

The unnamed defendant said she had only wanted to scare her friend when she grabbed the knife.

“I couldn’t believe what had just happened,” she said on the witness stand.

“She [Lightfoot] walked up on me and said ‘stick me, stick me, I want to die anyways.’ She ran up on me and she swung at me and I reacted. My intent was never to harm her. She was my friend.”

The defendant showed contrition and remorse for her actions, and apologised to Lightfoot’s family.

“I didn’t mean to kill her. She ran up on me. It was the worst mistake of my life … I wish I had been thinking clearly at the time.”

She also described the victim as “the best friend anyone could ever have” and “like a sister”.

Prosecutors pointed out that she has a history of violence and getting into fights.

The defendant will remain in juvenile detention until her 19th birthday and will then be transferred to prison to finish out her sentence.