A teenager charged with murder in the fatal stabbing of his foster mother in January and in the stabbing death two weeks earlier of another young man in foster care was held for trial on all charges Tuesday despite a key witness “going south” on the witness stand.

Xavier Johnson, now 18, was accused of fatally stabbing Renee Gilyard, 64, in her East Germantown home, stealing her debit card, and fleeing in her Nissan Rogue SUV. He was also charged in the December stabbing death of Jimmy Mao, 20, in the Southwest Philadelphia foster home they shared, then dumping his body down an embankment near SEPTA tracks.

In court Tuesday, the prosecution’s main witness, an 18-year-old man who was with Johnson when he allegedly crashed Gilyard’s SUV into a truck on the 4300 block of Sansom Street in West Philadelphia following a police chase, recanted what he had allegedly told detectives in a videotaped statement.

The video was not played in court, but Homicide Detective John Harkins read a two-page summary of a videotaped statement in which the witness allegedly said Johnson admitted to stabbing the two victims and dumping Mao’s body.

Assistant District Attorney Adam Geer asked that the name of the witness not be published out of concern for his safety and because he was 17 at the time of the incident.

Municipal Court Judge James DeLeon, after hearing testimony from Harkins, the witness, and a police officer, held Johnson for trial on all charges.

Officer James Boone testified that on the morning of Jan. 15, police were told to be on the lookout for a black Nissan Rogue possibly driven by Johnson, then 17, because it had been stolen in a homicide. About 10:20 a.m., he said, he spotted the SUV in West Philadelphia, and it took off at high speed when the driver saw his police car.

After running through red lights and stop signs, and striking two parked cars, the SUV hit a truck that was parked in the middle of the Sansom Street, Boone said. He said Johnson was in the driver’s seat, the witness was in the front-passenger seat, and two girls were in the back.

According to the summary of the witness’ statement, Johnson told him he had taken Gilyard’s vehicle and debit card after rushing into her home early one morning, knocking her down, and stabbing her. The witness also said Johnson used the debit card to get money, bought sneakers and paid for them to eat at a McDonald’s.

Police have said that Johnson killed Mao and stole a PlayStation and cash from him.

The witness also told detectives, according to his statement, that Johnson said he had choked Mao and stabbed him in the neck before putting Mao’s body in a duffel bag, then dumping it down an embankment. Johnson also showed the witness a cell-phone video of him stabbing Mao, the statement said.

On the witness stand Tuesday, when asked if he recalled making those statements, the witness repeatedly replied “No.”

He also contended that on the day of the crash, one of the girls was driving the SUV, not Johnson.

Defense attorney Leon Goodman argued that there wasn’t any evidence beyond the witness’ alleged statement that points to Johnson as having killed Mao. He said that at this stage in the court proceedings, he was not contesting the charges in relation to Gilyard’s death.