James Barrow, a career criminal, walked into a police station in 2016 and confessed to killing three people during two 2009 home-invasion robberies. On Wednesday, a judge ordered him to stand trial in two of the slayings, in which a young couple were bound with duct tape and shot in the head in a West Philadelphia bedroom.

Also ordered to stand trial with Barrow, 33, was Tyrek A. Smith, 32. One of Smith’s fingerprints on a piece of duct tape from the Aug. 29, 2009, slayings of Jonathan Pitts, 21, and Nakeisha Finks, 20, led police to link Smith to the case last October, Assistant District Attorney Danielle Burkavage said during the defendants’ preliminary hearing at the Stout Center for Criminal Justice.

Municipal Court Judge Wendy Pew quickly ruled that the two defendants should stand trial for murder and related crimes after their attorneys and Burkavage had finished questioning witnesses.

Looming over the case is the 2013 prosecution by the Philadelphia District Attorney’s Office of Nafis Pinkney, whom a jury found not guilty of the couple’s murders after he spent four years in jail waiting to be tried — part of that time as a death penalty defendant. Pinkney sued the city for malicious prosecution, and the case was settled for $750,000 in 2017.

When Thomas Malone, Smith’s attorney, repeatedly tried to bring up the district attorney’s failed prosecution of Pinkney to draw parallels to his client, Pew silenced him. “I don’t know anything about that, nor should I know anything about it. I’m trying to keep this in a vacuum as much as I can,” Pew snapped.

Homicide Detective Joseph Bamberski testified during Wednesday’s hearing that when he interviewed Smith on Dec. 31, 2018, Smith first denied taking part in the 2:30 a.m. burglary and murder of the couple, then asked for a lawyer but changed his mind and gave a statement.

Bamberski testified that Smith said that after the couple were bound in Pitts’ bedroom, Barrow gave him a handgun and told him to shoot them. Smith said he refused, stole drugs from the house, and went to his car to wait for Barrow, Bamberski testified.

When Barrow returned to the car, he was carrying a large container filled with coins, which the two men took to a supermarket to exchange for bills, Bamberski said Smith told him.

Malone asserted that the interview was unconstitutional because Smith repeatedly asked for a lawyer but was denied. The attorney said the statement smacked of Bamberski’s feeding information to Smith from which a false confession was pieced together.

Barrow was convicted last October for the Aug. 24, 2009, murder of Kamara Joseph, 30, a small-time drug dealer whom he confessed to fatally shooting after breaking into his Southwest Philadelphia home in search of drug money. Barrow was sentenced to life in state prison without parole plus 28½ to 57 years in that slaying.

During video-recorded interrogation interviews in 2016, Barrow told detectives details about the slayings that only the killer would know, detectives later said in court. He said he turned himself in out of fear that he was being stalked and didn’t want to suffer the same fates as his victims.

Barrow told the detectives that he targeted the homes of Pitts and Joseph because he had heard from others that they sold drugs and kept cash in their homes. He said that he committed the three murders alone, although Bamberski testified Wednesday that he never believed Barrow had acted alone.

Malone, Smith’s attorney, and Josh Scarpello, Barrow’s attorney, predicted that the case against their clients would be as problematic for the prosecution as the Pinkney case proved to be because of sloppy investigative work and unanswered questions.

They said Pinkney also gave police a statement incriminating himself that he testified was coerced by Detective James Pitts; Barrow’s fingerprints were not found at the crime scene; the fingerprint said to have been Smith’s was not linked to him until nine years after the couple’s deaths; and strands of hair found in one of Finks’ hands has never been tested to determine if they came from either of the two defendants.

The defense attorneys also noted that Burkavage told Barrow’s jurors last year that they should believe his statement that he killed the couple alone, but that now she is preparing to tell a second jury that Smith was his accomplice.

“What they did to Nafis Pinkney, they literally did the same thing to Mr. Smith. They picked him up without a warrant, held him against his will, refused him the lawyer that he requested over and over again, then told him what they wanted him to say,” Malone said.