A North Philadelphia man became a suspect in the shooting death last month of a transgender woman after he returned to the crime scene to look for his cell phone and initially claimed to be a witness to the shooting, a homicide detective told a judge Wednesday.

Detective John Harkins said that Troy Bailey, 28, showed up at the crime scene on the 3400 block of North 11th Street early on May 19 with his girlfriend, and that the two then voluntarily drove to the homicide unit to give statements. But their conflicting accounts and results from a search at Bailey’s house made him a suspect in the slaying, the detective said.

The victim, Tameka Michelle Washington, 40, of North Philadelphia, was a mentor and advocate in Philadelphia’s LGBTQ community.

Washington, who was shot about 5 a.m. May 19, was pronounced dead at Temple University Hospital about a half-hour later.

Municipal Court Judge Wendy Pew held Bailey for trial on murder and gun offenses after his preliminary hearing Wednesday.

Harkins said that after detectives learned that Bailey and his girlfriend, Ayana Coulter, gave conflicting statements, he applied for a warrant to search Bailey’s home on the 1100 block of West Venango Street, about three blocks from the shooting scene. Harkins, who executed the search warrant, said he found a magazine and a gun box for a Taurus 9mm handgun inside Bailey’s bedroom.

The gun box had the serial number for the firearm, he said, and detectives then learned that the gun in question was registered to Coulter.

Even after he was confronted with the discovery of the items in his bedroom, Bailey denied involvement in the shooting, Harkins said.

But after police recovered the Taurus 9mm handgun in Coulter’s apartment on the 4800 block of North Broad Street in Logan, Bailey confessed to the shooting in a video-recorded statement to detectives May 20, Harkins said.

The video statement was not played in court. Instead, Harkins read a written summary of that interview, which Bailey approved by signing the summary.

Bailey, who told detectives that he knew the victim as Michelle, said he was supposed to sell a gun to her boyfriend, according to the summary. He claimed that Washington then wanted him to perform a sex act.

He said that he got angry and so did she, and that she then pulled out a folding knife and he shot her more than once, according to the summary.

Asked by Assistant District Attorney Ashley Toczylowski if police recovered a knife at the crime scene, Harkins said no.

During cross-examination, defense attorney Shawn Page pointed out that the gun was found at Coulter’s apartment and was registered to her, and that she was with Bailey when he was at the crime scene to get his cell phone.

Harkins also testified that four 9mm fired cartridge casings were recovered at the scene along with Bailey’s cell phone, which was left there.

After the hearing, Toczylowski declined to comment on whether authorities believed Bailey’s statement about what happened before he shot Washington. She said Washington was shot once in the head and twice in the torso.

The victim’s sister, Crystal Davis, 35, told reporters that she did not believe Bailey’s account of what happened before the shooting.

“She left behind a lot of people who cared” about her, Davis said.