A South African judge is expected to rule in the next few hours whether Oscar Pistorius, accused of murdering his girlfriend, can be freed on bail.
The Paralympic sprinter denies murder, saying he shot Reeva Steenkamp thinking she was an intruder at his home.
His defence says contradictory evidence given by a detective has undermined the prosecution's case.
The prosecution, however, argues there is a risk Mr Pistorius may abscond and bail should be refused.
The athlete hopes to resume training next week if he is granted bail, his coach Ampie Louw said as he arrived at court for the fourth day of the hearing.
It's been the quiet, rather overlooked subtext to the drama and detail emerging from Courtroom C: the shambolic state of South Africa's police force.
Given that this is perhaps the most high-profile murder investigation that South Africa has seen in years, it makes you wonder what happens in other, more ordinary, cases, and to begin to understand why, for instance, the conviction rate for alleged rapists is pitifully low, and why so many police dockets are reported to "disappear" from the files, allowing suspects to walk free.
Police on Thursday replaced their lead detective in the case, Hilton Botha, after it emerged he faced attempted murder charges.
South Africa's most senior detective, Lt Gen Vineshkumar Moonoo, will now take charge of the investigation.
Prosecutors say Mr Pistorius fired four shots through a locked toilet door as Ms Steenkamp cowered on the other side. She was hit in the head, arm and hip.
The athlete - dubbed the "Blade Runner" for his prosthetic limbs - insists he was acting in self-defence, mistaking his girlfriend for an intruder.
In a third day of testimony at the Pretoria court on Thursday, defence and prosecution lawyers offered their final arguments.
Nel: summing up now? Duty of court to pay more than lip service to these crimes.. Violence against women. Mentioning pres Zuma's speech.
Nel: detective not expert re ballistics angles but he was eyewitness and his version not challenged.
Nel: suspicious about #OscarPistoriusclaim that he only slept that one night on other side of bed.
Nel: on available evidence #OscarPistoriusillegally in possession of ammunition - even if it is his father's.
Content from Twitter. Learn moreabout content from Twitter.
Lead defence lawyer Barry Roux said contradictory evidence given by Det Botha on Wednesday had undermined the prosecution's case.
Mr Roux said: "The poor quality of the evidence offered by investigative officer Botha exposed the disastrous shortcomings of the state's case."
The defence counsel said the fact that Mr Pistorius had carried Ms Steenkamp downstairs showed he was desperate to save her life.
Mr Roux added that the "known forensics is consistent" with the sprinter's version of events, and that a post-mortem examination showed Ms Steenkamp had an empty bladder at the time of her death.
That would indicate she visited the bathroom of her own accord, rather than to escape her boyfriend, he said.
The defence also asked for the charge of premeditated murder to be downgraded.'Prone to violence'
Prosecutor Gerrie Nel, however, told the court that Mr Pistorius should not be granted bail simply because he is famous.
He branded Mr Pistorius a man "prone to violence" who threatened Ms Steenkamp and eventually killed her.
What happened on the night?
He was critical of Mr Pistorius's sworn affidavit read to the court on Tuesday. He said the athlete had a history of violence and described him as "willing and ready to kill".
In an extraordinary turn of events early on Thursday it was revealed that investigating officer Det Botha faced seven counts of attempted murder.
The claims refer to a 2009 incident in which he and other officers allegedly opened fired on a minibus taxi carrying seven passengers when the driver apparently disobeyed an order to stop.
The detective is expected to appear in court in May.
National police commissioner Mangwashi Phiyega later announced that Lt Gen Moonoo would take over the Pistorius case.
Gen Moonoo will work with the police chief in Gauteng province on a case Ms Phiyega said required attention "at a national level".
Ms Phiyega denied that the decision to replace Det Botha was embarrassing for the police. He has not been suspended and could remain a potential witness in any trial.
If denied bail, Mr Pistorius could face months in prison before a full trial begins later this year.
The Paralympic sprinter denies murder, saying he shot Reeva Steenkamp thinking she was an intruder at his home.
His defence says contradictory evidence given by a detective has undermined the prosecution's case.
The prosecution, however, argues there is a risk Mr Pistorius may abscond and bail should be refused.
The athlete hopes to resume training next week if he is granted bail, his coach Ampie Louw said as he arrived at court for the fourth day of the hearing.
It's been the quiet, rather overlooked subtext to the drama and detail emerging from Courtroom C: the shambolic state of South Africa's police force.
Given that this is perhaps the most high-profile murder investigation that South Africa has seen in years, it makes you wonder what happens in other, more ordinary, cases, and to begin to understand why, for instance, the conviction rate for alleged rapists is pitifully low, and why so many police dockets are reported to "disappear" from the files, allowing suspects to walk free.
Police on Thursday replaced their lead detective in the case, Hilton Botha, after it emerged he faced attempted murder charges.
South Africa's most senior detective, Lt Gen Vineshkumar Moonoo, will now take charge of the investigation.
Prosecutors say Mr Pistorius fired four shots through a locked toilet door as Ms Steenkamp cowered on the other side. She was hit in the head, arm and hip.
The athlete - dubbed the "Blade Runner" for his prosthetic limbs - insists he was acting in self-defence, mistaking his girlfriend for an intruder.
In a third day of testimony at the Pretoria court on Thursday, defence and prosecution lawyers offered their final arguments.
Nel: summing up now? Duty of court to pay more than lip service to these crimes.. Violence against women. Mentioning pres Zuma's speech.
Nel: detective not expert re ballistics angles but he was eyewitness and his version not challenged.
Nel: suspicious about #OscarPistoriusclaim that he only slept that one night on other side of bed.
Nel: on available evidence #OscarPistoriusillegally in possession of ammunition - even if it is his father's.
Content from Twitter. Learn moreabout content from Twitter.
Lead defence lawyer Barry Roux said contradictory evidence given by Det Botha on Wednesday had undermined the prosecution's case.
Mr Roux said: "The poor quality of the evidence offered by investigative officer Botha exposed the disastrous shortcomings of the state's case."
The defence counsel said the fact that Mr Pistorius had carried Ms Steenkamp downstairs showed he was desperate to save her life.
Mr Roux added that the "known forensics is consistent" with the sprinter's version of events, and that a post-mortem examination showed Ms Steenkamp had an empty bladder at the time of her death.
That would indicate she visited the bathroom of her own accord, rather than to escape her boyfriend, he said.
The defence also asked for the charge of premeditated murder to be downgraded.'Prone to violence'
Prosecutor Gerrie Nel, however, told the court that Mr Pistorius should not be granted bail simply because he is famous.
He branded Mr Pistorius a man "prone to violence" who threatened Ms Steenkamp and eventually killed her.
What happened on the night?
He was critical of Mr Pistorius's sworn affidavit read to the court on Tuesday. He said the athlete had a history of violence and described him as "willing and ready to kill".
In an extraordinary turn of events early on Thursday it was revealed that investigating officer Det Botha faced seven counts of attempted murder.
The claims refer to a 2009 incident in which he and other officers allegedly opened fired on a minibus taxi carrying seven passengers when the driver apparently disobeyed an order to stop.
The detective is expected to appear in court in May.
National police commissioner Mangwashi Phiyega later announced that Lt Gen Moonoo would take over the Pistorius case.
Gen Moonoo will work with the police chief in Gauteng province on a case Ms Phiyega said required attention "at a national level".
Ms Phiyega denied that the decision to replace Det Botha was embarrassing for the police. He has not been suspended and could remain a potential witness in any trial.
If denied bail, Mr Pistorius could face months in prison before a full trial begins later this year.