Three teenagers accused of killing a Florida high school classmate planned the murder after he had sex with the ex-girlfriend of one of the suspects, police said. 

Miramar police said the suspects, two girls ages 17 and 16 and a 17-year-old boy, had been arrested for the killing of 18-year-old Dwight Grant. Grant, a senior at Miramar High School, was found dead last week at the apartment complex where he lived. 

He was badly beaten and had multiple stab wounds, according to an arrest affidavit released Monday. Authorities said Grant was lured by the male teen's current girlfriend, the 17-year-old girl, who he had arranged to meet to have sex.

BOSIE MALL SHOOTING LEAVES 2 PEOPLE DEAD AND 6 PEOPLE – INCLUDING COP – INJURED

The arrest affidavit said the boy was angry that Grant had sex with an ex-girlfriend. He later texted another suspect saying: "murder will definitely happen soon," the affidavit states. 

He told her that he was upset because he had an "emotional connection" to the girl. Authorities said Grant was lured by the jealous teen's current girlfriend, who he had arranged to meet to have sex.

In response, the other suspect texted him back saying that she would "help him," police said. The boy contacted the third suspect and said a boy had raped his female friend. 

Miramar police said they found no evidence of sexual assault and the former girlfriend told detectives that her sexual relationship with Grant was consensual. 

The text messages revealed that the teens planned to attack Grant by having one of the girls lure him out. When Grant walked to a stairwell, the other teens attacked him while the third acted as a lookout, authorities said. 

The three suspects are spotted on surveillance video arriving to the crime scene, police said. Authorities in South Florida said Dwight Grant was beaten and stabbed by three teenagers at his apartment complex. 

The three suspects are spotted on surveillance video arriving to the crime scene, police said. Authorities in South Florida said Dwight Grant was beaten and stabbed by three teenagers at his apartment complex.  (Miramar Police Department )

"You know who I am and why I'm here," the 17-year-old male suspect, who brought the knife and sword, told the victim, according to the affidavits. "You know I have to kill you now."

During the confrontation, Grant attempted to run away but was restrained, police said. He was stabbed in the neck with a knife, at which point he pleaded with the suspects to "end it for him," the affidavit said. 

That's when the male teen stabbed him in the chest with the sword, police said. The murder occurred on Oct. 17 but Grant's body wasn't found until two days later, police said. 

A knife was found beside him with a broken blade, the affidavit said. The three teens are charged with first-degree murder, tampering with evidence, and criminal conspiracy. 

Miramar High School 

Miramar High School  (Google Maps)

CLICK HERE TO GET THE FOX NEWS APP

After the murder, Grant's body was thrown over a railing and dragged to some nearby bushes, police said. At the same time, one suspect was attempting to clean the blood off the ground, they said. 

To conceal their roles in the crime, the group allegedly made a small fire in an effort to burn their clothes. The deadly attack was captured on video surveillance but has not yet been released, Miramar authorities said.