A second teenager, who allegedly had been a passenger in the car in which Independence teenager Matthew Haylock was fatally shot Tuesday evening, has now been charged in connection with that homicide.

Jackson County prosecutors Friday charged Luis Ramirez, 17, with second-degree murder and armed criminal action for the death of Haylock, also 17. Officers found Haylock dead from a gunshot wound in the north parking lot of the Independence Center shopping mall. The shooting happened about 8:30 p.m. Tuesday.

Wednesday, prosecutors filed the same charges against Tyler Gates, 18, of Independence. According to court documents, the charges against Ramirez stem from Gates telling police he and Ramirez had planned to rob Haylock of his gun. Ramirez then admitted to police they had planned a couple days before the shooting to rob Haylock, but Ramirez later wanted to back out of it.

According to court documents, about three days before the shooting Ramirez, Gates and Haylock had a three-way FaceTime conversation during which Haylock displayed his Glock 9mm handgun and 50-round magazine. Ramirez and Gates then decided to rob Haylock of the gun. At a Denny's restaurant earlier Tuesday, Ramirez told Gates he didn't want to rob Haylock anymore.

According to court documents, the two then went to Haylock’s residence, where he had his Glock handgun. Ramirez said he was a passenger in a car with Gates driving and Haylock in the rear passenger seat and that Gates asked to see Haylock's gun as they drove near the shopping center. When they reached the area in front of the main mall entrance, Haylock asked for the gun back and Gates said he would do so when he parked the car.

Instead, when Gates acted as if he parked the car and Ramirez got out, Gates took the gun off his lap and pointed it at Haylock. Ramirez told Gates not to rob his friend, but then as he was walking behind the vehicle he heard one gunshot and saw Haylock slumped over and unresponsive.

Ramirez said Gates asked him to help get the body out of the car, Ramirez refused and Gates reached around to push Haylock out of the car. Gates then asked Ramirez if he was coming, Ramirez again refused and said he was calling 911 and Gates drove away.

The car was found unoccupied at a residential area a couple of miles from the shooting, and investigators found a red substance presumed to be blood in the rear passenger seat and two handguns in the front passenger seat. Ramirez later told police he and Gates had obtained a Glock 26 gun about 1 a.m. Tuesday from an unknown source. It was for protection after their house had been shot at the day before. He told police he believed Haylock was shot with that gun but did not know the gun had been reported stolen out of St. Joseph.

A relative of Gates told police Gates had been in a “frantic state” and asked her to pick him up, which she did shortly before 9 p.m. Gates then said he had gotten into an altercation and said “I shot him ...” At that point, a television news report of the shooting came on, and when Gates saw it he said he had “(messed) up his life.”

The relative then said Gates told her he and two others had gone to the shopping center to “squash everything” regarding his house being shot at. He said an unknown person had gotten into the car and tried to strike Gates on the head with a pistol, and Gates shot the person and pushed him out of the vehicle.

While with police Wednesday, the relative tried talking to Gates over the phone and urged that he turn himself in. Gates asked who had come to the house, and when the relative said police had, Gates said he would also kill Ramirez because he “snitched.”

Bond for both Gates and Ramirez has been set at $250,000, 10 percent or secured.