MEMPHIS, Tenn. (AP) — A man testified Tuesday that he saw an acquaintance shoot his friend and business partner, unprovoked, outside his Tennessee home in a killing that authorities said sparked a daylong crime rampage that paralyzed Memphis and led to an intense manhunt.

Marcus Cash was one of four people at a gathering at his house who testified at a preliminary hearing for 19-year-old Ezekiel Kelly, who has been charged with killing three people and wounding three others on Sept. 7 as he drove around Memphis, livestreaming some of his activities on social media.

The shootings shut down much of the city. As police searched for the gunman, the minor-league Memphis Redbirds cleared the field during a game and public transportation was halted. Friends and relatives texted each other to make sure they were OK.

Kelly was arrested after he crashed during a police chase that night. He initially was charged only with first-degree murder in the slaying of Dewayne Tunstall at about 1 a.m. outside Cash’s home in east Memphis. Tuesday’s preliminary hearing was related only to that count.

Kelly was later charged in a 26-count indictment related to the other shootings. Kelly has pleaded not guilty to charges that include first-degree murder of Allison Parker and Richard Clark, attempted murder and committing an act of terrorism.

Mariko Webb, Marquez Murrell and Markaveon Walker testified that they and Kelly went to Cash’s house to eat chicken from a food truck, which Cash and Tunstall had planned to start as a business. Those at the gathering were carrying guns, but they were enjoying each others’ company, the witnesses said.

“We were chillin’, we were coolin’,” Webb said.

At one point, Kelly told Webb that he was going to take someone’s gun, Webb testified.

“Watch this,” Kelly said, according to Webb.

After eating, the group went outside to look at the food truck, the witnesses said. The group then gathered in a dark driveway to talk, the witnesses said.

Cash said he was standing next to Tunstall when Kelly shot Tunstall at close range.

“He was so close to me, I thought I was next,” Cash said.

After the shooting, Kelly tried to get into a car with Webb, Murrell and Walker, but he was refused entry, Murrell said.

“Everyone was screaming, `Get away from us,’” Murrell said.

Kelly’s lawyer, Jennifer Case, pressed the witnesses about having guns on them and suggested that some of them gathered to talk about the shooting after the fact to come up with a plan to “pin” it on Kelly. They denied doing so.

Under questioning from Case, Webb said Kelly used drugs and did not sleep much.

Case also questioned Cash about statements he made to police and the media after the shooting about being inside his home when the shooting happened. Cash said he lied about being inside the house — where his two young children and his girlfriend were — to avoid being identified as a witness while Kelly was on the run. At least one bullet went through the window of a room where the children were in bed.

“I’m protecting my family,” Cash said.

While the witnesses said they heard the shooting and ran away or hid to protect themselves, only Cash said he actually saw Kelly shoot Tunstall.

After the testimony, prosecutor Chris Lareau said Kelly’s statements about taking someone else’s gun amounted to premeditation.

Case argued that the witness statements were inconsistent and not credible. But Shelby County General Sessions Judge Karen Massey ruled that there was enough probable cause for the case to be presented to a grand jury for a possible indictment on first-degree murder.

Prosecutors have said that the two cases against Kelly eventually will be combined.