SAN JOSE -- On Monday, Hugo Ernesto Castro walked into the Santa Clara County Main Jail to make a confession. In his hand was a note disclosing the whereabouts of the body of his former girlfriend. A deputy listened to Castro, then told him the case was not in the jail's jurisdiction. 
 
 Miraculously, Castro then followed the deputy's instructions to walk unaccompanied to San Jose police headquarters, where police arrested him. The jail deputy who turned the confessed murderer out on the street has now been reassigned, sources said, marking another black eye for the already beleaguered jail system. 
 
 Hugo Castro, a 28-year-old San Jose resident, was arrested in connection with the death of a woman who was found dead inside a downtown San Jose apartment Oct. 26. ( Katie Nelson ) 
 
 On his second surrender try, Castro was interviewed by San Jose homicide detectives and directed officers to a downtown condominium where they found the reportedly strangled and stabbed body of 27-year-old Alessandra Barlas. Castro, who has a prior conviction for assaulting another ex-girlfriend in Nevada, was arraigned in a San Jose courtroom Wednesday on one count of murder with a knife enhancement. He is scheduled to return to court Nov. 16. 
 
 Responding to an inquiry by this newspaper, the Sheriff's Office said it has launched an internal investigation into why the deputy failed to detain or otherwise keep Castro close until San Jose officers could take him into custody, which police experts say is routine among police agencies in such instances. 
 
 Advertisement 
 
 "Once they leave, who knows what's going to happen next," said Jim Dudley, a criminal-justice lecturer at San Francisco State University and retired San Francisco police captain. "Maybe they go the two blocks and turn themselves in. Or maybe they have second thoughts, or go home and destroy evidence." 
 
 "You're not going to spoil someone else's investigation by making a detention of this guy," Dudley added. "There's a huge downside if you let him go and he jumps on the next train out of town." 
 
 According to a statement from Sheriff Laurie Smith, Castro walked into the Main Jail lobby and told a civilian staff member that he wanted to "turn himself in." After finding no active warrants for him, the staffer spoke with a correctional deputy, who asked Castro what he wanted to turn himself in for, prompting Castro to request a more private conversation, according to the statement. 
 
 At one point, Castro reportedly passed the civilian staffer a note stating there was a dead body at an address on Third Street. Eventually, the deputy told Castro to report the body to SJPD. 
 
 "If the initial findings are true, then the Custody Deputy failed to meet the expectations of the department and we'll take appropriate action to deal with the deputy," Smith said in her statement. 
 
 The deputy has been reassigned pending the outcome of the investigation, Smith said. 
 
 The snafu comes amid heightened scrutiny on the county jails in the wake of the August fatal beating of mentally ill inmate Michael Tyree, allegedly at the hands of three correctional deputies who have been charged with murder. On Tuesday, the county appointed a blue-ribbon commission led by former San Jose Independent Police Auditor and retired judge LaDoris Cordell to head a top-to-bottom audit and massive reform effort to address voluminous allegations of inmate mistreatment. Internal investigations have already yielded two arrests of deputies for unrelated misconduct. 
 
 Meanwhile, the 28-year-old Castro is now being held without bail at the same Main Jail where he initially tried to surrender. 
 
 According to a statement of facts written by San Jose homicide Detective Wayne Smith, Castro told police that he and Barlas agreed to meet Friday at a condo at The Globe complex on Third Street. At some point over the weekend, Castro said he strangled Barlas and stabbed her, the statement said. 
 
 On Monday morning, Castro went to the jail with the hand-written note disclosing the location of Barlas' body, and was sent to SJPD, where he gave the same note to officers there. Another set of officers went to the condo and found Barlas on an upstairs bed with several visible stab wounds on her front torso, according to police. 
 
 Barlas, a San Jose State University alum, was pronounced dead at the scene. When she was killed was not immediately clear. Neither Castro nor Barlas lived at the condo, police said. 
 
 Once Barlas was found, Castro was arrested and interviewed by Smith and Detective Sgt. Rick Yu, during which he told them that he killed her, according to Smith's statement. Police did not disclose a motive for the killing, the city's 25th homicide of the year. 
 
 Police have said only that Castro and the victim were in a "prior dating relationship," which friends of Barlas corroborated to this newspaper. 
 
 According to Nevada state records, in 2009, Castro was sentenced to three years at a Carson City work camp after a conviction for battery with a deadly weapon against another former girlfriend. Deputy District Attorney David Boyd said that crime would factor into Castro's sentence if he is convicted in Barlas' death. 
 
 Staff writer Katie Nelson contributed to this report. Contact Robert Salonga at 408-920-5002. Follow him at Twitter.com/robertsalonga. ||||| San Jose man arrested in stabbing death of ex-girlfriend 
 
 Photo: Williams, Kale L Image 1 of / 1 Caption Close Image 1 of 1 Hugo Castro, 28, of San Jose, was arrested on suspicion of murder after his ex-girlfriend was found stabbed to death in an apartment the morning of Oct. 26, 2015. Hugo Castro, 28, of San Jose, was arrested on suspicion of murder after his ex-girlfriend was found stabbed to death in an apartment the morning of Oct. 26, 2015. Photo: Williams, Kale L San Jose man arrested in stabbing death of ex-girlfriend 1 / 1 Back to Gallery 
 
 A woman was found stabbed to death in a downtown San Jose apartment, and police arrested her 28-year-old ex-boyfriend on suspicion of killing her, officials said Tuesday. 
 
 Around 10:20 a.m. Monday, officers went to an apartment on the 100 block of South Third Street to conduct a welfare check, said Sgt. Enrique Garcia, a police spokesman. 
 
 Officers found the victim, whose name was not released, suffering from at least one stab wound. She died at the scene, Garcia said. 
 
 The suspect, Hugo Castro of San Jose, who had a previous romantic relationship with the victim, was taken into custody and booked on suspicion of murder, Garcia said. 
 
 The apartment where the dead woman was found belongs to a third party, Garcia said, but investigators don’t believe anyone else was involved in the slaying. 
 
 Police asked people with information about the killing to contact Sgt. Rick Yu at (408) 277-5283. 
 
 Kale Williams is a San Francisco Chronicle staff writer. E-mail: kwilliams@sfchronicle.com Twitter: @sfkale
– One cannot simply walk into the Santa Clara County jail, apparently. Hugo Ernesto Castro tried to surrender at the facility in San Jose on Monday, but he was told to go elsewhere even after he had confessed to stabbing his ex-girlfriend and handed over a note revealing where her body was, reports the San Jose Mercury News. A deputy at the prison told the 28-year-old that he was in the wrong place and instructed him to walk two blocks to police headquarters, which he obligingly did. Police found the body of Castro's former girlfriend at the address he gave, and he was arrested, reports the San Francisco Chronicle. The sheriff's office is trying to find out why the deputy didn't follow standard procedure and detain Castro or at least escort him to the police station. "Once they leave, who knows what's going to happen next," a retired San Francisco police captain tells the Mercury News. "Maybe they go the two blocks and turn themselves in. Or maybe they have second thoughts, or go home and destroy evidence." The deputy has been reassigned, the Mercury News reports, and Castro is now being held at the jail he went to in the first place. (An inmate who escaped from a federal prison tried to sue the government over the prison's poor security.)