The lead detective in the Oscar Pistorius case has been dropped, following revelations that he is facing charges of attempted murder himself.
Warrant Officer Hilton Botha appeared at the 26-year-old athlete's bail hearing earlier , where the defence team questioned the veteran policeman's credibility.
In October 2011, Botha and two other officers are alleged to have opened fire on seven passengers in a taxi mini-bus in an attempt to stop it.
It is claimed that the officers, who were on duty at the time, were drunk. Botha and his two colleagues were arrested but the charges were initially dropped.
However, they were reinstated by the state prosecutor in the days before the killing of 29-year-old model Reeva Steenkamp.
Pistorius, a double-amputee Olympian, has been charged with premeditated murder after his girlfriend was shot dead in the early hours of Valentine's Day.
After the track star's bail hearing was adjourned until Friday, police commissioner Riah Phiyega announced senior detective Lieutenant General Vineshkumar Moonoo would replace Botha.
"We recognise the significance, the importance and the severity of the matter," she said.
Bulewa Makeke, from South Africa's National Prosecuting Authority, said the attempted murder charges had been reinstated against Botha on February 4.
Police say they found out about it after Botha testified in Pistorius' bail hearing on Wednesday.
Ms Makeke indicated the charges were reinstated because more evidence had been gathered.
Botha, who will appear in court in May, denies being drunk and has told a South African news channel that he was chasing suspects.
Prosecutors admitted that the timing of the attempted murder charges had been "totally weird".
Under cross-examination during Pistorius' bail hearing, Botha was accused of contaminating the crime scene in the Paralympic star's home and backtracked on key details, including the distance of witnesses from the house.
In his often confused testimony, Botha, a 24-year police veteran with 16 years as a detective, conceded that police had left a 9mm slug from the shots that killed Miss Steenkamp inside a toilet at the scene.
Botha said of the investigation: "I'm sure it could have been handled better."
The lead defence counsel Barry Roux said: "The poor quality of the evidence of investigating officer Botha further exposed... the disastrous shortcomings in the state's case."
Miss Steenkamp was found by medics at Pistorius's luxury Pretoria home covered in bloodied towels, with bullet wounds to her head, elbow and hip. She died at the scene.
Pistorius said he mistook his girlfriend for an intruder.