PRETORIA, South Africa -- The South African police replaced the lead investigator in the Oscar Pistorius homicide case on Thursday after embarrassing revelations that he was facing seven charges of attempted murder himself.
The decision by the national police commissioner to remove the investigator, Warrant Officer Detective Hilton Botha, was the latest in a series of abrupt twists and setbacks in the prosecution of Mr. Pistorius, the double amputee track star accused of murdering his girlfriend on Feb. 14 by firing four shots through a locked bathroom door while she was on the other side.
Riah Phiyega, the commissioner, said at a news conference that a divisional police commissioner, Lt. Gen. Vinesh Moonoo, would be assigned to preside over "this very important investigation."
After widespread media reports about the charges against Detective Botha, Gerrie Nel, the prosecutor, said at the start of the hearing on Thursday that he had just learned about them. The news only compounded questions about Detective Botha's work on the Pistorius case. Under cross-examination on Wednesday, he was forced to acknowledge several mistakes in the investigation and to concede that he could not rule out Mr. Pistorius's version of events based on the existing evidence.
While the prosecution has accused Mr. Pistorius, 26, of premeditated murder, Mr. Pistorius has said he opened fire through the door thinking there was an intruder in his home, located in a gated community in Pretoria, and had no intention of killing his girlfriend, Reeva Steenkamp, 29, a model and law school graduate.
"The poor quality of evidence presented by chief investigating officer Botha exposed the disastrous shortcomings in the state's case," Mr. Pistorius's defense lawyer, Barry Roux, said on Thursday.
Mr. Nel tried to regain some of the ground lost Wednesday, arguing that no matter who Mr. Pistorius thought was behind the bathroom door, the fact that he shot the person constituted murder.
"What we can't forget is the applicant is charged with murdering a defenseless, innocent woman," he said.
Mr. Nel repeatedly questioned Mr. Pistorius's version of events. He has said he did not realize that Ms. Steenkamp was no longer in bed as he rose to investigate the supposed intruder, shouting to her to call the police.
"You want to protect her, but you don't even look at her?" Mr. Nel said. "You don't even ask, 'Reeva, are you all right?' " He asked how Mr. Pistorius could have retrieved the 9-millimeter pistol used in the shooting from under her side of the bed without noticing that she was gone.
"His version is so improbable," he said.
Another bit of drama rippled through the courtroom on Thursday when the magistrate hearing the case ordered a brief suspension because of a "threat to the court," which turned out to be a fracas that had broken out outside the courtroom. The hearing continued a few minutes later and was later adjourned until Friday.
In a separate announcement to reporters on Thursday, a police brigadier, Neville Malila, said Detective Botha was set to appear in court in May on the attempted murder charges, which stem from an episode in 2011 in which Mr. Botha and two other police officers fired at a minivan.
"Botha and two other policemen allegedly tried to stop a minibus taxi with seven people," Brigadier Malila said. "They fired shots." While the charges were initially dropped, "we were informed yesterday that the charges will be reinstated," he said.
Medupe Simasiku, a spokesman for the National Prosecuting Authority, told reporters that the decision to reinstate the charges was made on Feb. 4, long before Ms. Steenkamp was killed.
"It's completely unrelated to this trial," the spokesman said.
Detective Botha was quoted in South African news reports as denying claims that he was drunk at the time. He said he and the other officers had aimed at the wheels of the minivan without causing injuries, and he was convinced that the case had been withdrawn.
Earlier, the hearing dwelt for some time on the absence of urine from Ms. Steenkamp's bladder when she died, consistent, the defense said, with the theory that she simply went to the toilet and did not flee from Mr. Pistorius after an argument, as the prosecution asserts.
Mr. Roux, the defense lawyer, said she might have locked the toilet door after hearing Mr. Pistorius call out that an intruder was in the house.
The charges have tarnished Mr. Pistorius's global reputation as an emblem of athletic prowess and of triumph over adversity. On Thursday, Nike became the latest corporate sponsor to suspend ties with him. "We believe Oscar Pistorius should be afforded due process, and we will continue to monitor the situation closely," the company said in a statement on its Web site.
The Pistorius case has riveted South Africa and fascinated a wider audience, reflecting Mr. Pistorius's status as one of the world's most renowned athletes, whose distinctive carbon-fiber running blades inspired the nickname Blade Runner.
He was born without fibula bones in both legs and underwent amputation before he was 1. Yet he went on to become a Paralympic champion and, in the 2012 London Olympics, the first Paralympic sprinter to compete against able-bodied runners.
The questions surrounding Detective Botha surfaced on Wednesday after he explained how preliminary ballistic evidence supported the prosecution's assertion that Mr. Pistorius had been wearing prosthetic legs when he shot at the bathroom door.
Mr. Pistorius said in an affidavit read to the court on Tuesday that he had hobbled over from bed on his stumps and had felt extremely vulnerable to a possible intruder as a result.
Lydia Polgreen reported from Pretoria, and Alan Cowell from London.
This article originally appeared in The New York Times.